Linux server.kiran-academy.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
: 194.233.91.196 | : 216.73.216.9
Cant Read [ /etc/named.conf ]
7.4.32
finalho
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
share /
cmake /
Modules /
[ HOME SHELL ]
Name
Size
Permission
Action
CMakeAddFortranSubdirectory
[ DIR ]
drwxr-xr-x
Compiler
[ DIR ]
drwxr-xr-x
CompilerId
[ DIR ]
drwxr-xr-x
FindCUDA
[ DIR ]
drwxr-xr-x
FortranCInterface
[ DIR ]
drwxr-xr-x
IntelVSImplicitPath
[ DIR ]
drwxr-xr-x
Platform
[ DIR ]
drwxr-xr-x
AddFileDependencies.cmake
1002
B
-rw-r--r--
AutomocInfo.cmake.in
675
B
-rw-r--r--
BasicConfigVersion-AnyNewerVer...
1.34
KB
-rw-r--r--
BasicConfigVersion-ExactVersio...
1.8
KB
-rw-r--r--
BasicConfigVersion-SameMajorVe...
1.69
KB
-rw-r--r--
BundleUtilities.cmake
28.62
KB
-rw-r--r--
CMake.cmake
772
B
-rw-r--r--
CMakeASM-ATTInformation.cmake
1020
B
-rw-r--r--
CMakeASMCompiler.cmake.in
545
B
-rw-r--r--
CMakeASMInformation.cmake
5.28
KB
-rw-r--r--
CMakeASM_MASMInformation.cmake
903
B
-rw-r--r--
CMakeASM_NASMInformation.cmake
1.45
KB
-rw-r--r--
CMakeAddFortranSubdirectory.cm...
7.73
KB
-rw-r--r--
CMakeAddNewLanguage.txt
1.49
KB
-rw-r--r--
CMakeBackwardCompatibilityC.cm...
3.38
KB
-rw-r--r--
CMakeBackwardCompatibilityCXX....
2.12
KB
-rw-r--r--
CMakeBorlandFindMake.cmake
736
B
-rw-r--r--
CMakeBuildSettings.cmake.in
681
B
-rw-r--r--
CMakeCCompiler.cmake.in
1.85
KB
-rw-r--r--
CMakeCCompilerABI.c
572
B
-rw-r--r--
CMakeCCompilerId.c.in
7.41
KB
-rw-r--r--
CMakeCInformation.cmake
7.56
KB
-rw-r--r--
CMakeCXXCompiler.cmake.in
2.01
KB
-rw-r--r--
CMakeCXXCompilerABI.cpp
450
B
-rw-r--r--
CMakeCXXCompilerId.cpp.in
7.32
KB
-rw-r--r--
CMakeCXXInformation.cmake
10.41
KB
-rw-r--r--
CMakeClDeps.cmake
1.64
KB
-rw-r--r--
CMakeCommonLanguageInclude.cma...
5.11
KB
-rw-r--r--
CMakeCompilerABI.h
1.18
KB
-rw-r--r--
CMakeConfigurableFile.in
35
B
-rw-r--r--
CMakeDependentOption.cmake
2.03
KB
-rw-r--r--
CMakeDetermineASM-ATTCompiler....
859
B
-rw-r--r--
CMakeDetermineASMCompiler.cmak...
7.24
KB
-rw-r--r--
CMakeDetermineASM_MASMCompiler...
942
B
-rw-r--r--
CMakeDetermineASM_NASMCompiler...
1011
B
-rw-r--r--
CMakeDetermineCCompiler.cmake
7.23
KB
-rw-r--r--
CMakeDetermineCXXCompiler.cmak...
7.31
KB
-rw-r--r--
CMakeDetermineCompiler.cmake
3.37
KB
-rw-r--r--
CMakeDetermineCompilerABI.cmak...
5.9
KB
-rw-r--r--
CMakeDetermineCompilerId.cmake
19.06
KB
-rw-r--r--
CMakeDetermineFortranCompiler....
9.94
KB
-rw-r--r--
CMakeDetermineJavaCompiler.cma...
4.13
KB
-rw-r--r--
CMakeDetermineRCCompiler.cmake
2.52
KB
-rw-r--r--
CMakeDetermineSystem.cmake
7.41
KB
-rw-r--r--
CMakeDetermineVSServicePack.cm...
6.6
KB
-rw-r--r--
CMakeExpandImportedTargets.cma...
5.77
KB
-rw-r--r--
CMakeExportBuildSettings.cmake
1.67
KB
-rw-r--r--
CMakeExtraGeneratorDetermineCo...
4.94
KB
-rw-r--r--
CMakeFindBinUtils.cmake
2.76
KB
-rw-r--r--
CMakeFindCodeBlocks.cmake
1.06
KB
-rw-r--r--
CMakeFindEclipseCDT4.cmake
4.65
KB
-rw-r--r--
CMakeFindFrameworks.cmake
1.16
KB
-rw-r--r--
CMakeFindKDevelop3.cmake
934
B
-rw-r--r--
CMakeFindPackageMode.cmake
6.2
KB
-rw-r--r--
CMakeFindWMake.cmake
737
B
-rw-r--r--
CMakeFindXCode.cmake
720
B
-rw-r--r--
CMakeForceCompiler.cmake
2.98
KB
-rw-r--r--
CMakeFortranCompiler.cmake.in
2.09
KB
-rw-r--r--
CMakeFortranCompilerABI.F
1023
B
-rw-r--r--
CMakeFortranCompilerId.F.in
4.38
KB
-rw-r--r--
CMakeFortranInformation.cmake
9.62
KB
-rw-r--r--
CMakeGenericSystem.cmake
6.66
KB
-rw-r--r--
CMakeGraphVizOptions.cmake
3
KB
-rw-r--r--
CMakeImportBuildSettings.cmake
1008
B
-rw-r--r--
CMakeJOMFindMake.cmake
736
B
-rw-r--r--
CMakeJavaCompiler.cmake.in
538
B
-rw-r--r--
CMakeJavaInformation.cmake
2.19
KB
-rw-r--r--
CMakeMSYSFindMake.cmake
954
B
-rw-r--r--
CMakeMinGWFindMake.cmake
1.24
KB
-rw-r--r--
CMakeNMakeFindMake.cmake
738
B
-rw-r--r--
CMakeNinjaFindMake.cmake
740
B
-rw-r--r--
CMakePackageConfigHelpers.cmak...
11.29
KB
-rw-r--r--
CMakeParseArguments.cmake
5.65
KB
-rw-r--r--
CMakeParseImplicitLinkInfo.cma...
6.88
KB
-rw-r--r--
CMakePlatformId.h.in
4.29
KB
-rw-r--r--
CMakePrintHelpers.cmake
4.32
KB
-rw-r--r--
CMakePrintSystemInformation.cm...
2.38
KB
-rw-r--r--
CMakePushCheckState.cmake
3.33
KB
-rw-r--r--
CMakeRCCompiler.cmake.in
267
B
-rw-r--r--
CMakeRCInformation.cmake
1.88
KB
-rw-r--r--
CMakeSystem.cmake.in
537
B
-rw-r--r--
CMakeSystemSpecificInformation...
2.79
KB
-rw-r--r--
CMakeTestASM-ATTCompiler.cmake
992
B
-rw-r--r--
CMakeTestASMCompiler.cmake
1.3
KB
-rw-r--r--
CMakeTestASM_MASMCompiler.cmak...
1021
B
-rw-r--r--
CMakeTestASM_NASMCompiler.cmak...
989
B
-rw-r--r--
CMakeTestCCompiler.cmake
3.52
KB
-rw-r--r--
CMakeTestCXXCompiler.cmake
3.41
KB
-rw-r--r--
CMakeTestCompilerCommon.cmake
894
B
-rw-r--r--
CMakeTestFortranCompiler.cmake
4.76
KB
-rw-r--r--
CMakeTestGNU.c
175
B
-rw-r--r--
CMakeTestJavaCompiler.cmake
950
B
-rw-r--r--
CMakeTestRCCompiler.cmake
1.01
KB
-rw-r--r--
CMakeTestWatcomVersion.c
20
B
-rw-r--r--
CMakeUnixFindMake.cmake
1.02
KB
-rw-r--r--
CMakeVS10FindMake.cmake
2.65
KB
-rw-r--r--
CMakeVS11FindMake.cmake
2.61
KB
-rw-r--r--
CMakeVS12FindMake.cmake
1.09
KB
-rw-r--r--
CMakeVS6BackwardCompatibility....
1.4
KB
-rw-r--r--
CMakeVS6FindMake.cmake
1
KB
-rw-r--r--
CMakeVS71FindMake.cmake
1.06
KB
-rw-r--r--
CMakeVS7BackwardCompatibility....
1.4
KB
-rw-r--r--
CMakeVS7FindMake.cmake
1021
B
-rw-r--r--
CMakeVS8FindMake.cmake
1.45
KB
-rw-r--r--
CMakeVS9FindMake.cmake
1.76
KB
-rw-r--r--
CMakeVerifyManifest.cmake
4.16
KB
-rw-r--r--
CPack.DS_Store.in
12
KB
-rw-r--r--
CPack.Description.plist.in
438
B
-rw-r--r--
CPack.Info.plist.in
1.1
KB
-rw-r--r--
CPack.OSXScriptLauncher.in
28.9
KB
-rw-r--r--
CPack.OSXScriptLauncher.rsrc.i...
362
B
-rw-r--r--
CPack.OSXX11.Info.plist.in
1.57
KB
-rw-r--r--
CPack.OSXX11.main.scpt.in
1.83
KB
-rw-r--r--
CPack.RuntimeScript.in
1.85
KB
-rw-r--r--
CPack.STGZ_Header.sh.in
3.76
KB
-rw-r--r--
CPack.VolumeIcon.icns.in
44.67
KB
-rw-r--r--
CPack.background.png.in
45.97
KB
-rw-r--r--
CPack.cmake
22.86
KB
-rw-r--r--
CPack.distribution.dist.in
448
B
-rw-r--r--
CPackBundle.cmake
1.77
KB
-rw-r--r--
CPackComponent.cmake
20.24
KB
-rw-r--r--
CPackCygwin.cmake
1.13
KB
-rw-r--r--
CPackDMG.cmake
2.66
KB
-rw-r--r--
CPackDeb.cmake
15.34
KB
-rw-r--r--
CPackNSIS.cmake
4.57
KB
-rw-r--r--
CPackPackageMaker.cmake
1.56
KB
-rw-r--r--
CPackRPM.cmake
42.01
KB
-rw-r--r--
CPackWIX.cmake
4.32
KB
-rw-r--r--
CPackZIP.cmake
1.42
KB
-rw-r--r--
CTest.cmake
9.7
KB
-rw-r--r--
CTestScriptMode.cmake
989
B
-rw-r--r--
CTestTargets.cmake
3.42
KB
-rw-r--r--
CTestUseLaunchers.cmake
2.7
KB
-rw-r--r--
CheckCCompilerFlag.cmake
2.9
KB
-rw-r--r--
CheckCSourceCompiles.cmake
3.45
KB
-rw-r--r--
CheckCSourceRuns.cmake
3.44
KB
-rw-r--r--
CheckCXXCompilerFlag.cmake
3.07
KB
-rw-r--r--
CheckCXXSourceCompiles.cmake
3.48
KB
-rw-r--r--
CheckCXXSourceRuns.cmake
3.46
KB
-rw-r--r--
CheckCXXSymbolExists.cmake
1.94
KB
-rw-r--r--
CheckForPthreads.c
701
B
-rw-r--r--
CheckFortranFunctionExists.cma...
2.49
KB
-rw-r--r--
CheckFunctionExists.c
380
B
-rw-r--r--
CheckFunctionExists.cmake
2.97
KB
-rw-r--r--
CheckIncludeFile.c.in
130
B
-rw-r--r--
CheckIncludeFile.cmake
3.03
KB
-rw-r--r--
CheckIncludeFile.cxx.in
65
B
-rw-r--r--
CheckIncludeFileCXX.cmake
3.05
KB
-rw-r--r--
CheckIncludeFiles.cmake
3.47
KB
-rw-r--r--
CheckLanguage.cmake
2.64
KB
-rw-r--r--
CheckLibraryExists.cmake
2.79
KB
-rw-r--r--
CheckLibraryExists.lists.in
298
B
-rw-r--r--
CheckPrototypeDefinition.c.in
514
B
-rw-r--r--
CheckPrototypeDefinition.cmake
4.04
KB
-rw-r--r--
CheckSizeOf.cmake
813
B
-rw-r--r--
CheckStructHasMember.cmake
1.77
KB
-rw-r--r--
CheckSymbolExists.cmake
4.16
KB
-rw-r--r--
CheckTypeSize.c.in
801
B
-rw-r--r--
CheckTypeSize.cmake
7.47
KB
-rw-r--r--
CheckTypeSizeMap.cmake.in
31
B
-rw-r--r--
CheckVariableExists.c
363
B
-rw-r--r--
CheckVariableExists.cmake
2.47
KB
-rw-r--r--
Dart.cmake
4.06
KB
-rw-r--r--
DartConfiguration.tcl.in
2.74
KB
-rw-r--r--
DeployQt4.cmake
13.19
KB
-rw-r--r--
Documentation.cmake
1.45
KB
-rw-r--r--
DummyCXXFile.cxx
27
B
-rw-r--r--
ExternalData.cmake
29.97
KB
-rw-r--r--
ExternalData_config.cmake.in
268
B
-rw-r--r--
ExternalProject.cmake
61.48
KB
-rw-r--r--
FLTKCompatibility.cmake
635
B
-rw-r--r--
FeatureSummary.cmake
19.38
KB
-rw-r--r--
FindALSA.cmake
2.14
KB
-rw-r--r--
FindASPELL.cmake
1.47
KB
-rw-r--r--
FindAVIFile.cmake
1.74
KB
-rw-r--r--
FindArmadillo.cmake
3.82
KB
-rw-r--r--
FindBISON.cmake
7.11
KB
-rw-r--r--
FindBLAS.cmake
16.39
KB
-rw-r--r--
FindBZip2.cmake
2.38
KB
-rw-r--r--
FindBoost.cmake
48.76
KB
-rw-r--r--
FindBullet.cmake
3.18
KB
-rw-r--r--
FindCABLE.cmake
2.84
KB
-rw-r--r--
FindCUDA.cmake
65.86
KB
-rw-r--r--
FindCURL.cmake
2.29
KB
-rw-r--r--
FindCVS.cmake
2.18
KB
-rw-r--r--
FindCoin3D.cmake
2.67
KB
-rw-r--r--
FindCups.cmake
2.91
KB
-rw-r--r--
FindCurses.cmake
6.57
KB
-rw-r--r--
FindCxxTest.cmake
7.61
KB
-rw-r--r--
FindCygwin.cmake
924
B
-rw-r--r--
FindDCMTK.cmake
4.44
KB
-rw-r--r--
FindDart.cmake
1.32
KB
-rw-r--r--
FindDevIL.cmake
2.82
KB
-rw-r--r--
FindDoxygen.cmake
5.05
KB
-rw-r--r--
FindEXPAT.cmake
2.37
KB
-rw-r--r--
FindFLEX.cmake
6.27
KB
-rw-r--r--
FindFLTK.cmake
11.1
KB
-rw-r--r--
FindFLTK2.cmake
9.01
KB
-rw-r--r--
FindFreetype.cmake
5.08
KB
-rw-r--r--
FindGCCXML.cmake
960
B
-rw-r--r--
FindGDAL.cmake
3.26
KB
-rw-r--r--
FindGIF.cmake
2.66
KB
-rw-r--r--
FindGLEW.cmake
1.27
KB
-rw-r--r--
FindGLU.cmake
1020
B
-rw-r--r--
FindGLUT.cmake
3.01
KB
-rw-r--r--
FindGTK.cmake
4.11
KB
-rw-r--r--
FindGTK2.cmake
22.83
KB
-rw-r--r--
FindGTest.cmake
5.41
KB
-rw-r--r--
FindGettext.cmake
8.1
KB
-rw-r--r--
FindGit.cmake
2.06
KB
-rw-r--r--
FindGnuTLS.cmake
2.37
KB
-rw-r--r--
FindGnuplot.cmake
1.96
KB
-rw-r--r--
FindHDF5.cmake
14.34
KB
-rw-r--r--
FindHSPELL.cmake
2.04
KB
-rw-r--r--
FindHTMLHelp.cmake
1.8
KB
-rw-r--r--
FindHg.cmake
1.79
KB
-rw-r--r--
FindITK.cmake
2.19
KB
-rw-r--r--
FindIcotool.cmake
1.66
KB
-rw-r--r--
FindImageMagick.cmake
9.96
KB
-rw-r--r--
FindJNI.cmake
9.93
KB
-rw-r--r--
FindJPEG.cmake
1.57
KB
-rw-r--r--
FindJasper.cmake
2.16
KB
-rw-r--r--
FindJava.cmake
7.83
KB
-rw-r--r--
FindKDE3.cmake
10.27
KB
-rw-r--r--
FindKDE4.cmake
3.48
KB
-rw-r--r--
FindLAPACK.cmake
9.28
KB
-rw-r--r--
FindLATEX.cmake
3.24
KB
-rw-r--r--
FindLibArchive.cmake
2.87
KB
-rw-r--r--
FindLibLZMA.cmake
3.53
KB
-rw-r--r--
FindLibXml2.cmake
2.67
KB
-rw-r--r--
FindLibXslt.cmake
2.86
KB
-rw-r--r--
FindLua50.cmake
2.75
KB
-rw-r--r--
FindLua51.cmake
2.58
KB
-rw-r--r--
FindLua52.cmake
2.2
KB
-rw-r--r--
FindMFC.cmake
2.24
KB
-rw-r--r--
FindMPEG.cmake
1.62
KB
-rw-r--r--
FindMPEG2.cmake
1.88
KB
-rw-r--r--
FindMPI.cmake
29.25
KB
-rw-r--r--
FindMatlab.cmake
3.39
KB
-rw-r--r--
FindMotif.cmake
1.29
KB
-rw-r--r--
FindOpenAL.cmake
3.85
KB
-rw-r--r--
FindOpenGL.cmake
5.29
KB
-rw-r--r--
FindOpenMP.cmake
5.3
KB
-rw-r--r--
FindOpenSSL.cmake
9.44
KB
-rw-r--r--
FindOpenSceneGraph.cmake
7.26
KB
-rw-r--r--
FindOpenThreads.cmake
4.16
KB
-rw-r--r--
FindPHP4.cmake
2.48
KB
-rw-r--r--
FindPNG.cmake
4.29
KB
-rw-r--r--
FindPackageHandleStandardArgs....
13.01
KB
-rw-r--r--
FindPackageMessage.cmake
1.92
KB
-rw-r--r--
FindPerl.cmake
3.03
KB
-rw-r--r--
FindPerlLibs.cmake
8.08
KB
-rw-r--r--
FindPhysFS.cmake
1.61
KB
-rw-r--r--
FindPike.cmake
1.19
KB
-rw-r--r--
FindPkgConfig.cmake
14.5
KB
-rw-r--r--
FindPostgreSQL.cmake
7.57
KB
-rw-r--r--
FindProducer.cmake
2.7
KB
-rw-r--r--
FindProtobuf.cmake
7.89
KB
-rw-r--r--
FindPythonInterp.cmake
6.07
KB
-rw-r--r--
FindPythonLibs.cmake
11.29
KB
-rw-r--r--
FindQt.cmake
6.07
KB
-rw-r--r--
FindQt3.cmake
9.48
KB
-rw-r--r--
FindQt4.cmake
59.73
KB
-rw-r--r--
FindQuickTime.cmake
1.39
KB
-rw-r--r--
FindRTI.cmake
3.57
KB
-rw-r--r--
FindRuby.cmake
9.85
KB
-rw-r--r--
FindSDL.cmake
7.24
KB
-rw-r--r--
FindSDL_image.cmake
3.88
KB
-rw-r--r--
FindSDL_mixer.cmake
3.88
KB
-rw-r--r--
FindSDL_net.cmake
3.74
KB
-rw-r--r--
FindSDL_sound.cmake
13.48
KB
-rw-r--r--
FindSDL_ttf.cmake
3.74
KB
-rw-r--r--
FindSWIG.cmake
2.89
KB
-rw-r--r--
FindSelfPackers.cmake
1.84
KB
-rw-r--r--
FindSquish.cmake
10.14
KB
-rw-r--r--
FindSubversion.cmake
5.65
KB
-rw-r--r--
FindTCL.cmake
7.97
KB
-rw-r--r--
FindTIFF.cmake
1.92
KB
-rw-r--r--
FindTclStub.cmake
4.73
KB
-rw-r--r--
FindTclsh.cmake
3.74
KB
-rw-r--r--
FindThreads.cmake
5.84
KB
-rw-r--r--
FindUnixCommands.cmake
1.48
KB
-rw-r--r--
FindVTK.cmake
5.78
KB
-rw-r--r--
FindWget.cmake
1.26
KB
-rw-r--r--
FindWish.cmake
3.01
KB
-rw-r--r--
FindX11.cmake
20.05
KB
-rw-r--r--
FindXMLRPC.cmake
4.97
KB
-rw-r--r--
FindZLIB.cmake
3.58
KB
-rw-r--r--
Findosg.cmake
2.21
KB
-rw-r--r--
FindosgAnimation.cmake
2.17
KB
-rw-r--r--
FindosgDB.cmake
2.08
KB
-rw-r--r--
FindosgFX.cmake
2.08
KB
-rw-r--r--
FindosgGA.cmake
2.09
KB
-rw-r--r--
FindosgIntrospection.cmake
2.26
KB
-rw-r--r--
FindosgManipulator.cmake
2.24
KB
-rw-r--r--
FindosgParticle.cmake
2.17
KB
-rw-r--r--
FindosgPresentation.cmake
2.33
KB
-rw-r--r--
FindosgProducer.cmake
2.18
KB
-rw-r--r--
FindosgQt.cmake
2.14
KB
-rw-r--r--
FindosgShadow.cmake
2.14
KB
-rw-r--r--
FindosgSim.cmake
2.09
KB
-rw-r--r--
FindosgTerrain.cmake
2.15
KB
-rw-r--r--
FindosgText.cmake
2.09
KB
-rw-r--r--
FindosgUtil.cmake
2.1
KB
-rw-r--r--
FindosgViewer.cmake
2.13
KB
-rw-r--r--
FindosgVolume.cmake
2.13
KB
-rw-r--r--
FindosgWidget.cmake
2.18
KB
-rw-r--r--
Findosg_functions.cmake
3.05
KB
-rw-r--r--
FindwxWidgets.cmake
36.04
KB
-rw-r--r--
FindwxWindows.cmake
24.15
KB
-rw-r--r--
FortranCInterface.cmake
12.16
KB
-rw-r--r--
GNUInstallDirs.cmake
7.18
KB
-rw-r--r--
GenerateExportHeader.cmake
12.41
KB
-rw-r--r--
GetPrerequisites.cmake
28.59
KB
-rw-r--r--
ITKCompatibility.cmake
689
B
-rw-r--r--
InstallRequiredSystemLibraries...
14.93
KB
-rw-r--r--
KDE3Macros.cmake
13.26
KB
-rw-r--r--
MacOSXBundleInfo.plist.in
1.22
KB
-rw-r--r--
MacOSXFrameworkInfo.plist.in
886
B
-rw-r--r--
MacroAddFileDependencies.cmake
1.29
KB
-rw-r--r--
NSIS.InstallOptions.ini.in
678
B
-rw-r--r--
NSIS.template.in
27.82
KB
-rw-r--r--
ProcessorCount.cmake
6.84
KB
-rw-r--r--
Qt4ConfigDependentSettings.cma...
7.9
KB
-rw-r--r--
Qt4Macros.cmake
18.11
KB
-rw-r--r--
RepositoryInfo.txt.in
56
B
-rw-r--r--
SelectLibraryConfigurations.cm...
3.39
KB
-rw-r--r--
Squish4RunTestCase.bat
629
B
-rw-r--r--
Squish4RunTestCase.sh
773
B
-rw-r--r--
SquishRunTestCase.bat
219
B
-rw-r--r--
SquishRunTestCase.sh
272
B
-rw-r--r--
SquishTestScript.cmake
3.8
KB
-rw-r--r--
SystemInformation.cmake
3.57
KB
-rw-r--r--
SystemInformation.in
4.59
KB
-rw-r--r--
TestBigEndian.cmake
4.51
KB
-rw-r--r--
TestCXXAcceptsFlag.cmake
1.78
KB
-rw-r--r--
TestEndianess.c.in
871
B
-rw-r--r--
TestForANSIForScope.cmake
1.77
KB
-rw-r--r--
TestForANSIStreamHeaders.cmake
1.29
KB
-rw-r--r--
TestForANSIStreamHeaders.cxx
60
B
-rw-r--r--
TestForAnsiForScope.cxx
87
B
-rw-r--r--
TestForSSTREAM.cmake
1.74
KB
-rw-r--r--
TestForSSTREAM.cxx
154
B
-rw-r--r--
TestForSTDNamespace.cmake
1.69
KB
-rw-r--r--
TestForSTDNamespace.cxx
75
B
-rw-r--r--
UseEcos.cmake
10.1
KB
-rw-r--r--
UseJava.cmake
35.32
KB
-rw-r--r--
UseJavaClassFilelist.cmake
2.13
KB
-rw-r--r--
UseJavaSymlinks.cmake
1.09
KB
-rw-r--r--
UsePkgConfig.cmake
2.95
KB
-rw-r--r--
UseQt4.cmake
2.96
KB
-rw-r--r--
UseSWIG.cmake
9.97
KB
-rw-r--r--
UseVTK40.cmake
1.14
KB
-rw-r--r--
UseVTKBuildSettings40.cmake
1.89
KB
-rw-r--r--
UseVTKConfig40.cmake
13.12
KB
-rw-r--r--
Use_wxWindows.cmake
2.37
KB
-rw-r--r--
UsewxWidgets.cmake
3.17
KB
-rw-r--r--
VTKCompatibility.cmake
2.13
KB
-rw-r--r--
WIX.template.in
1.47
KB
-rw-r--r--
WriteBasicConfigVersionFile.cm...
1.72
KB
-rw-r--r--
ecos_clean.cmake
968
B
-rw-r--r--
exportheader.cmake.in
911
B
-rw-r--r--
kde3init_dummy.cpp.in
227
B
-rw-r--r--
kde3uic.cmake
1.21
KB
-rw-r--r--
readme.txt
9.1
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : ExternalData.cmake
# - Manage data files stored outside source tree # Use this module to unambiguously reference data files stored outside the # source tree and fetch them at build time from arbitrary local and remote # content-addressed locations. Functions provided by this module recognize # arguments with the syntax "DATA{<name>}" as references to external data, # replace them with full paths to local copies of those data, and create build # rules to fetch and update the local copies. # # The DATA{} syntax is literal and the <name> is a full or relative path # within the source tree. The source tree must contain either a real data # file at <name> or a "content link" at <name><ext> containing a hash of the # real file using a hash algorithm corresponding to <ext>. For example, the # argument "DATA{img.png}" may be satisfied by either a real "img.png" file in # the current source directory or a "img.png.md5" file containing its MD5 sum. # # The 'ExternalData_Expand_Arguments' function evaluates DATA{} references # in its arguments and constructs a new list of arguments: # ExternalData_Expand_Arguments( # <target> # Name of data management target # <outVar> # Output variable # [args...] # Input arguments, DATA{} allowed # ) # It replaces each DATA{} reference in an argument with the full path of a # real data file on disk that will exist after the <target> builds. # # The 'ExternalData_Add_Test' function wraps around the CMake add_test() # command but supports DATA{} references in its arguments: # ExternalData_Add_Test( # <target> # Name of data management target # ... # Arguments of add_test(), DATA{} allowed # ) # It passes its arguments through ExternalData_Expand_Arguments and then # invokes add_test() using the results. # # The 'ExternalData_Add_Target' function creates a custom target to manage # local instances of data files stored externally: # ExternalData_Add_Target( # <target> # Name of data management target # ) # It creates custom commands in the target as necessary to make data files # available for each DATA{} reference previously evaluated by other functions # provided by this module. A list of URL templates must be provided in the # variable ExternalData_URL_TEMPLATES using the placeholders "%(algo)" and # "%(hash)" in each template. Data fetch rules try each URL template in order # by substituting the hash algorithm name for "%(algo)" and the hash value for # "%(hash)". # # The following hash algorithms are supported: # %(algo) <ext> Description # ------- ----- ----------- # MD5 .md5 Message-Digest Algorithm 5, RFC 1321 # SHA1 .sha1 US Secure Hash Algorithm 1, RFC 3174 # SHA224 .sha224 US Secure Hash Algorithms, RFC 4634 # SHA256 .sha256 US Secure Hash Algorithms, RFC 4634 # SHA384 .sha384 US Secure Hash Algorithms, RFC 4634 # SHA512 .sha512 US Secure Hash Algorithms, RFC 4634 # Note that the hashes are used only for unique data identification and # download verification. This is not security software. # # Example usage: # include(ExternalData) # set(ExternalData_URL_TEMPLATES "file:///local/%(algo)/%(hash)" # "http://data.org/%(algo)/%(hash)") # ExternalData_Add_Test(MyData # NAME MyTest # COMMAND MyExe DATA{MyInput.png} # ) # ExternalData_Add_Target(MyData) # When test "MyTest" runs the "DATA{MyInput.png}" argument will be replaced by # the full path to a real instance of the data file "MyInput.png" on disk. If # the source tree contains a content link such as "MyInput.png.md5" then the # "MyData" target creates a real "MyInput.png" in the build tree. # # The DATA{} syntax can be told to fetch a file series using the form # "DATA{<name>,:}", where the ":" is literal. If the source tree contains a # group of files or content links named like a series then a reference to one # member adds rules to fetch all of them. Although all members of a series # are fetched, only the file originally named by the DATA{} argument is # substituted for it. The default configuration recognizes file series names # ending with "#.ext", "_#.ext", ".#.ext", or "-#.ext" where "#" is a sequence # of decimal digits and ".ext" is any single extension. Configure it with a # regex that parses <number> and <suffix> parts from the end of <name>: # ExternalData_SERIES_PARSE = regex of the form (<number>)(<suffix>)$ # For more complicated cases set: # ExternalData_SERIES_PARSE = regex with at least two () groups # ExternalData_SERIES_PARSE_PREFIX = <prefix> regex group number, if any # ExternalData_SERIES_PARSE_NUMBER = <number> regex group number # ExternalData_SERIES_PARSE_SUFFIX = <suffix> regex group number # Configure series number matching with a regex that matches the # <number> part of series members named <prefix><number><suffix>: # ExternalData_SERIES_MATCH = regex matching <number> in all series members # Note that the <suffix> of a series does not include a hash-algorithm # extension. # # The DATA{} syntax can alternatively match files associated with the named # file and contained in the same directory. Associated files may be specified # by options using the syntax DATA{<name>,<opt1>,<opt2>,...}. Each option may # specify one file by name or specify a regular expression to match file names # using the syntax REGEX:<regex>. For example, the arguments # DATA{MyData/MyInput.mhd,MyInput.img} # File pair # DATA{MyData/MyFrames00.png,REGEX:MyFrames[0-9]+\\.png} # Series # will pass MyInput.mha and MyFrames00.png on the command line but ensure # that the associated files are present next to them. # # The DATA{} syntax may reference a directory using a trailing slash and a # list of associated files. The form DATA{<name>/,<opt1>,<opt2>,...} adds # rules to fetch any files in the directory that match one of the associated # file options. For example, the argument DATA{MyDataDir/,REGEX:.*} will pass # the full path to a MyDataDir directory on the command line and ensure that # the directory contains files corresponding to every file or content link in # the MyDataDir source directory. # # The variable ExternalData_LINK_CONTENT may be set to the name of a supported # hash algorithm to enable automatic conversion of real data files referenced # by the DATA{} syntax into content links. For each such <file> a content # link named "<file><ext>" is created. The original file is renamed to the # form ".ExternalData_<algo>_<hash>" to stage it for future transmission to # one of the locations in the list of URL templates (by means outside the # scope of this module). The data fetch rule created for the content link # will use the staged object if it cannot be found using any URL template. # # The variable ExternalData_OBJECT_STORES may be set to a list of local # directories that store objects using the layout <dir>/%(algo)/%(hash). # These directories will be searched first for a needed object. If the object # is not available in any store then it will be fetched remotely using the URL # templates and added to the first local store listed. If no stores are # specified the default is a location inside the build tree. # # The variable ExternalData_SOURCE_ROOT may be set to the highest source # directory containing any path named by a DATA{} reference. The default is # CMAKE_SOURCE_DIR. ExternalData_SOURCE_ROOT and CMAKE_SOURCE_DIR must refer # to directories within a single source distribution (e.g. they come together # in one tarball). # # The variable ExternalData_BINARY_ROOT may be set to the directory to hold # the real data files named by expanded DATA{} references. The default is # CMAKE_BINARY_DIR. The directory layout will mirror that of content links # under ExternalData_SOURCE_ROOT. # # Variables ExternalData_TIMEOUT_INACTIVITY and ExternalData_TIMEOUT_ABSOLUTE # set the download inactivity and absolute timeouts, in seconds. The defaults # are 60 seconds and 300 seconds, respectively. Set either timeout to 0 # seconds to disable enforcement. #============================================================================= # Copyright 2010-2013 Kitware, Inc. # # Distributed under the OSI-approved BSD License (the "License"); # see accompanying file Copyright.txt for details. # # This software is distributed WITHOUT ANY WARRANTY; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # See the License for more information. #============================================================================= # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) function(ExternalData_add_test target) # Expand all arguments as a single string to preserve escaped semicolons. ExternalData_expand_arguments("${target}" testArgs "${ARGN}") add_test(${testArgs}) endfunction() function(ExternalData_add_target target) if(NOT ExternalData_URL_TEMPLATES) message(FATAL_ERROR "ExternalData_URL_TEMPLATES is not set!") endif() if(NOT ExternalData_OBJECT_STORES) set(ExternalData_OBJECT_STORES ${CMAKE_BINARY_DIR}/ExternalData/Objects) endif() set(config ${CMAKE_CURRENT_BINARY_DIR}/${target}_config.cmake) configure_file(${_ExternalData_SELF_DIR}/ExternalData_config.cmake.in ${config} @ONLY) set(files "") # Set "_ExternalData_FILE_${file}" for each output file to avoid duplicate # rules. Use local data first to prefer real files over content links. # Custom commands to copy or link local data. get_property(data_local GLOBAL PROPERTY _ExternalData_${target}_LOCAL) foreach(entry IN LISTS data_local) string(REPLACE "|" ";" tuple "${entry}") list(GET tuple 0 file) list(GET tuple 1 name) if(NOT DEFINED "_ExternalData_FILE_${file}") set("_ExternalData_FILE_${file}" 1) add_custom_command( COMMENT "Generating ${file}" OUTPUT "${file}" COMMAND ${CMAKE_COMMAND} -Drelative_top=${CMAKE_BINARY_DIR} -Dfile=${file} -Dname=${name} -DExternalData_ACTION=local -DExternalData_CONFIG=${config} -P ${_ExternalData_SELF} MAIN_DEPENDENCY "${name}" ) list(APPEND files "${file}") endif() endforeach() # Custom commands to fetch remote data. get_property(data_fetch GLOBAL PROPERTY _ExternalData_${target}_FETCH) foreach(entry IN LISTS data_fetch) string(REPLACE "|" ";" tuple "${entry}") list(GET tuple 0 file) list(GET tuple 1 name) list(GET tuple 2 ext) set(stamp "${ext}-stamp") if(NOT DEFINED "_ExternalData_FILE_${file}") set("_ExternalData_FILE_${file}" 1) add_custom_command( # Users care about the data file, so hide the hash/timestamp file. COMMENT "Generating ${file}" # The hash/timestamp file is the output from the build perspective. # List the real file as a second output in case it is a broken link. # The files must be listed in this order so CMake can hide from the # make tool that a symlink target may not be newer than the input. OUTPUT "${file}${stamp}" "${file}" # Run the data fetch/update script. COMMAND ${CMAKE_COMMAND} -Drelative_top=${CMAKE_BINARY_DIR} -Dfile=${file} -Dname=${name} -Dext=${ext} -DExternalData_ACTION=fetch -DExternalData_CONFIG=${config} -P ${_ExternalData_SELF} # Update whenever the object hash changes. MAIN_DEPENDENCY "${name}${ext}" ) list(APPEND files "${file}${stamp}") endif() endforeach() # Custom target to drive all update commands. add_custom_target(${target} ALL DEPENDS ${files}) endfunction() function(ExternalData_expand_arguments target outArgsVar) # Replace DATA{} references with real arguments. set(data_regex "DATA{([^;{}\r\n]*)}") set(other_regex "([^D]|D[^A]|DA[^T]|DAT[^A]|DATA[^{])+|.") set(outArgs "") # This list expansion un-escapes semicolons in list element values so we # must re-escape them below anywhere a new list expansion will occur. foreach(arg IN LISTS ARGN) if("x${arg}" MATCHES "${data_regex}") # Re-escape in-value semicolons before expansion in foreach below. string(REPLACE ";" "\\;" tmp "${arg}") # Split argument into DATA{}-pieces and other pieces. string(REGEX MATCHALL "${data_regex}|${other_regex}" pieces "${tmp}") # Compose output argument with DATA{}-pieces replaced. set(outArg "") foreach(piece IN LISTS pieces) if("x${piece}" MATCHES "^x${data_regex}$") # Replace this DATA{}-piece with a file path. string(REGEX REPLACE "${data_regex}" "\\1" data "${piece}") _ExternalData_arg("${target}" "${piece}" "${data}" file) set(outArg "${outArg}${file}") else() # No replacement needed for this piece. set(outArg "${outArg}${piece}") endif() endforeach() else() # No replacements needed in this argument. set(outArg "${arg}") endif() # Re-escape in-value semicolons in resulting list. string(REPLACE ";" "\\;" outArg "${outArg}") list(APPEND outArgs "${outArg}") endforeach() set("${outArgsVar}" "${outArgs}" PARENT_SCOPE) endfunction() #----------------------------------------------------------------------------- # Private helper interface set(_ExternalData_REGEX_ALGO "MD5|SHA1|SHA224|SHA256|SHA384|SHA512") set(_ExternalData_REGEX_EXT "md5|sha1|sha224|sha256|sha384|sha512") set(_ExternalData_SELF "${CMAKE_CURRENT_LIST_FILE}") get_filename_component(_ExternalData_SELF_DIR "${_ExternalData_SELF}" PATH) function(_ExternalData_compute_hash var_hash algo file) if("${algo}" MATCHES "^${_ExternalData_REGEX_ALGO}$") file("${algo}" "${file}" hash) set("${var_hash}" "${hash}" PARENT_SCOPE) else() message(FATAL_ERROR "Hash algorithm ${algo} unimplemented.") endif() endfunction() function(_ExternalData_random var) string(RANDOM LENGTH 6 random) set("${var}" "${random}" PARENT_SCOPE) endfunction() function(_ExternalData_exact_regex regex_var string) string(REGEX REPLACE "([][+.*()^])" "\\\\\\1" regex "${string}") set("${regex_var}" "${regex}" PARENT_SCOPE) endfunction() function(_ExternalData_atomic_write file content) _ExternalData_random(random) set(tmp "${file}.tmp${random}") file(WRITE "${tmp}" "${content}") file(RENAME "${tmp}" "${file}") endfunction() function(_ExternalData_link_content name var_ext) if("${ExternalData_LINK_CONTENT}" MATCHES "^(${_ExternalData_REGEX_ALGO})$") set(algo "${ExternalData_LINK_CONTENT}") else() message(FATAL_ERROR "Unknown hash algorithm specified by ExternalData_LINK_CONTENT:\n" " ${ExternalData_LINK_CONTENT}") endif() _ExternalData_compute_hash(hash "${algo}" "${name}") get_filename_component(dir "${name}" PATH) set(staged "${dir}/.ExternalData_${algo}_${hash}") string(TOLOWER ".${algo}" ext) _ExternalData_atomic_write("${name}${ext}" "${hash}\n") file(RENAME "${name}" "${staged}") set("${var_ext}" "${ext}" PARENT_SCOPE) file(RELATIVE_PATH relname "${ExternalData_SOURCE_ROOT}" "${name}${ext}") message(STATUS "Linked ${relname} to ExternalData ${algo}/${hash}") endfunction() function(_ExternalData_arg target arg options var_file) # Separate data path from the options. string(REPLACE "," ";" options "${options}") list(GET options 0 data) list(REMOVE_AT options 0) # Interpret trailing slashes as directories. set(data_is_directory 0) if("x${data}" MATCHES "^x(.*)([/\\])$") set(data_is_directory 1) set(data "${CMAKE_MATCH_1}") endif() # Convert to full path. if(IS_ABSOLUTE "${data}") set(absdata "${data}") else() set(absdata "${CMAKE_CURRENT_SOURCE_DIR}/${data}") endif() get_filename_component(absdata "${absdata}" ABSOLUTE) # Convert to relative path under the source tree. if(NOT ExternalData_SOURCE_ROOT) set(ExternalData_SOURCE_ROOT "${CMAKE_SOURCE_DIR}") endif() set(top_src "${ExternalData_SOURCE_ROOT}") file(RELATIVE_PATH reldata "${top_src}" "${absdata}") if(IS_ABSOLUTE "${reldata}" OR "${reldata}" MATCHES "^\\.\\./") message(FATAL_ERROR "Data file referenced by argument\n" " ${arg}\n" "does not lie under the top-level source directory\n" " ${top_src}\n") endif() if(data_is_directory AND NOT IS_DIRECTORY "${top_src}/${reldata}") message(FATAL_ERROR "Data directory referenced by argument\n" " ${arg}\n" "corresponds to source tree path\n" " ${reldata}\n" "that does not exist as a directory!") endif() if(NOT ExternalData_BINARY_ROOT) set(ExternalData_BINARY_ROOT "${CMAKE_BINARY_DIR}") endif() set(top_bin "${ExternalData_BINARY_ROOT}") # Handle in-source builds gracefully. if("${top_src}" STREQUAL "${top_bin}") if(ExternalData_LINK_CONTENT) message(WARNING "ExternalData_LINK_CONTENT cannot be used in-source") set(ExternalData_LINK_CONTENT 0) endif() set(top_same 1) endif() set(external "") # Entries external to the source tree. set(internal "") # Entries internal to the source tree. set(have_original ${data_is_directory}) # Process options. set(series_option "") set(associated_files "") set(associated_regex "") foreach(opt ${options}) if("x${opt}" MATCHES "^xREGEX:[^:/]+$") # Regular expression to match associated files. string(REGEX REPLACE "^REGEX:" "" regex "${opt}") list(APPEND associated_regex "${regex}") elseif(opt STREQUAL ":") # Activate series matching. set(series_option "${opt}") elseif("x${opt}" MATCHES "^[^][:/*?]+$") # Specific associated file. list(APPEND associated_files "${opt}") else() message(FATAL_ERROR "Unknown option \"${opt}\" in argument\n" " ${arg}\n") endif() endforeach() if(series_option) if(data_is_directory) message(FATAL_ERROR "Series option \"${series_option}\" not allowed with directories.") endif() if(associated_files OR associated_regex) message(FATAL_ERROR "Series option \"${series_option}\" not allowed with associated files.") endif() # Load a whole file series. _ExternalData_arg_series() elseif(data_is_directory) if(associated_files OR associated_regex) # Load listed/matching associated files in the directory. _ExternalData_arg_associated() else() message(FATAL_ERROR "Data directory referenced by argument\n" " ${arg}\n" "must list associated files.") endif() else() # Load the named data file. _ExternalData_arg_single() if(associated_files OR associated_regex) # Load listed/matching associated files. _ExternalData_arg_associated() endif() endif() if(NOT have_original) message(FATAL_ERROR "Data file referenced by argument\n" " ${arg}\n" "corresponds to source tree path\n" " ${reldata}\n" "that does not exist as a file (with or without an extension)!") endif() if(external) # Make the series available in the build tree. set_property(GLOBAL APPEND PROPERTY _ExternalData_${target}_FETCH "${external}") set_property(GLOBAL APPEND PROPERTY _ExternalData_${target}_LOCAL "${internal}") set("${var_file}" "${top_bin}/${reldata}" PARENT_SCOPE) else() # The whole series is in the source tree. set("${var_file}" "${top_src}/${reldata}" PARENT_SCOPE) endif() endfunction() macro(_ExternalData_arg_associated) # Associated files lie in the same directory. if(data_is_directory) set(reldir "${reldata}") else() get_filename_component(reldir "${reldata}" PATH) endif() if(reldir) set(reldir "${reldir}/") endif() _ExternalData_exact_regex(reldir_regex "${reldir}") # Find files named explicitly. foreach(file ${associated_files}) _ExternalData_exact_regex(file_regex "${file}") _ExternalData_arg_find_files("${reldir}${file}" "${reldir_regex}${file_regex}") endforeach() # Find files matching the given regular expressions. set(all "") set(sep "") foreach(regex ${associated_regex}) set(all "${all}${sep}${reldir_regex}${regex}") set(sep "|") endforeach() _ExternalData_arg_find_files("${reldir}" "${all}") endmacro() macro(_ExternalData_arg_single) # Match only the named data by itself. _ExternalData_exact_regex(data_regex "${reldata}") _ExternalData_arg_find_files("${reldata}" "${data_regex}") endmacro() macro(_ExternalData_arg_series) # Configure series parsing and matching. set(series_parse_prefix "") set(series_parse_number "\\1") set(series_parse_suffix "\\2") if(ExternalData_SERIES_PARSE) if(ExternalData_SERIES_PARSE_NUMBER AND ExternalData_SERIES_PARSE_SUFFIX) if(ExternalData_SERIES_PARSE_PREFIX) set(series_parse_prefix "\\${ExternalData_SERIES_PARSE_PREFIX}") endif() set(series_parse_number "\\${ExternalData_SERIES_PARSE_NUMBER}") set(series_parse_suffix "\\${ExternalData_SERIES_PARSE_SUFFIX}") elseif(NOT "x${ExternalData_SERIES_PARSE}" MATCHES "^x\\([^()]*\\)\\([^()]*\\)\\$$") message(FATAL_ERROR "ExternalData_SERIES_PARSE is set to\n" " ${ExternalData_SERIES_PARSE}\n" "which is not of the form\n" " (<number>)(<suffix>)$\n" "Fix the regular expression or set variables\n" " ExternalData_SERIES_PARSE_PREFIX = <prefix> regex group number, if any\n" " ExternalData_SERIES_PARSE_NUMBER = <number> regex group number\n" " ExternalData_SERIES_PARSE_SUFFIX = <suffix> regex group number\n" ) endif() set(series_parse "${ExternalData_SERIES_PARSE}") else() set(series_parse "([0-9]*)(\\.[^./]*)$") endif() if(ExternalData_SERIES_MATCH) set(series_match "${ExternalData_SERIES_MATCH}") else() set(series_match "[_.-]?[0-9]*") endif() # Parse the base, number, and extension components of the series. string(REGEX REPLACE "${series_parse}" "${series_parse_prefix};${series_parse_number};${series_parse_suffix}" tuple "${reldata}") list(LENGTH tuple len) if(NOT "${len}" EQUAL 3) message(FATAL_ERROR "Data file referenced by argument\n" " ${arg}\n" "corresponds to path\n" " ${reldata}\n" "that does not match regular expression\n" " ${series_parse}") endif() list(GET tuple 0 relbase) list(GET tuple 2 ext) # Glob files that might match the series. # Then match base, number, and extension. _ExternalData_exact_regex(series_base "${relbase}") _ExternalData_exact_regex(series_ext "${ext}") _ExternalData_arg_find_files("${relbase}*${ext}" "${series_base}${series_match}${series_ext}") endmacro() function(_ExternalData_arg_find_files pattern regex) file(GLOB globbed RELATIVE "${top_src}" "${top_src}/${pattern}*") foreach(entry IN LISTS globbed) if("x${entry}" MATCHES "^x(.*)(\\.(${_ExternalData_REGEX_EXT}))$") set(relname "${CMAKE_MATCH_1}") set(alg "${CMAKE_MATCH_2}") else() set(relname "${entry}") set(alg "") endif() if("x${relname}" MATCHES "^x${regex}$" # matches AND NOT IS_DIRECTORY "${top_src}/${entry}" # not a directory AND NOT "x${relname}" MATCHES "(^x|/)\\.ExternalData_" # not staged obj ) set(name "${top_src}/${relname}") set(file "${top_bin}/${relname}") if(alg) list(APPEND external "${file}|${name}|${alg}") elseif(ExternalData_LINK_CONTENT) _ExternalData_link_content("${name}" alg) list(APPEND external "${file}|${name}|${alg}") elseif(NOT top_same) list(APPEND internal "${file}|${name}") endif() if("${relname}" STREQUAL "${reldata}") set(have_original 1) endif() endif() endforeach() set(external "${external}" PARENT_SCOPE) set(internal "${internal}" PARENT_SCOPE) set(have_original "${have_original}" PARENT_SCOPE) endfunction() #----------------------------------------------------------------------------- # Private script mode interface if(CMAKE_GENERATOR OR NOT ExternalData_ACTION) return() endif() if(ExternalData_CONFIG) include(${ExternalData_CONFIG}) endif() if(NOT ExternalData_URL_TEMPLATES) message(FATAL_ERROR "No ExternalData_URL_TEMPLATES set!") endif() function(_ExternalData_link_or_copy src dst) # Create a temporary file first. get_filename_component(dst_dir "${dst}" PATH) file(MAKE_DIRECTORY "${dst_dir}") _ExternalData_random(random) set(tmp "${dst}.tmp${random}") if(UNIX) # Create a symbolic link. set(tgt "${src}") if(relative_top) # Use relative path if files are close enough. file(RELATIVE_PATH relsrc "${relative_top}" "${src}") file(RELATIVE_PATH relfile "${relative_top}" "${dst}") if(NOT IS_ABSOLUTE "${relsrc}" AND NOT "${relsrc}" MATCHES "^\\.\\./" AND NOT IS_ABSOLUTE "${reldst}" AND NOT "${reldst}" MATCHES "^\\.\\./") file(RELATIVE_PATH tgt "${dst_dir}" "${src}") endif() endif() execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${tgt}" "${tmp}" RESULT_VARIABLE result) else() # Create a copy. execute_process(COMMAND "${CMAKE_COMMAND}" -E copy "${src}" "${tmp}" RESULT_VARIABLE result) endif() if(result) file(REMOVE "${tmp}") message(FATAL_ERROR "Failed to create\n ${tmp}\nfrom\n ${obj}") endif() # Atomically create/replace the real destination. file(RENAME "${tmp}" "${dst}") endfunction() function(_ExternalData_download_file url file err_var msg_var) set(retry 3) while(retry) math(EXPR retry "${retry} - 1") if(ExternalData_TIMEOUT_INACTIVITY) set(inactivity_timeout INACTIVITY_TIMEOUT ${ExternalData_TIMEOUT_INACTIVITY}) elseif(NOT "${ExternalData_TIMEOUT_INACTIVITY}" EQUAL 0) set(inactivity_timeout INACTIVITY_TIMEOUT 60) else() set(inactivity_timeout "") endif() if(ExternalData_TIMEOUT_ABSOLUTE) set(absolute_timeout TIMEOUT ${ExternalData_TIMEOUT_ABSOLUTE}) elseif(NOT "${ExternalData_TIMEOUT_ABSOLUTE}" EQUAL 0) set(absolute_timeout TIMEOUT 300) else() set(absolute_timeout "") endif() file(DOWNLOAD "${url}" "${file}" STATUS status LOG log ${inactivity_timeout} ${absolute_timeout} SHOW_PROGRESS) list(GET status 0 err) list(GET status 1 msg) if(err) if("${msg}" MATCHES "HTTP response code said error" AND "${log}" MATCHES "error: 503") set(msg "temporarily unavailable") endif() elseif("${log}" MATCHES "\nHTTP[^\n]* 503") set(err TRUE) set(msg "temporarily unavailable") endif() if(NOT err OR NOT "${msg}" MATCHES "partial|timeout|temporarily") break() elseif(retry) message(STATUS "[download terminated: ${msg}, retries left: ${retry}]") endif() endwhile() set("${err_var}" "${err}" PARENT_SCOPE) set("${msg_var}" "${msg}" PARENT_SCOPE) endfunction() function(_ExternalData_download_object name hash algo var_obj) # Search all object stores for an existing object. foreach(dir ${ExternalData_OBJECT_STORES}) set(obj "${dir}/${algo}/${hash}") if(EXISTS "${obj}") message(STATUS "Found object: \"${obj}\"") set("${var_obj}" "${obj}" PARENT_SCOPE) return() endif() endforeach() # Download object to the first store. list(GET ExternalData_OBJECT_STORES 0 store) set(obj "${store}/${algo}/${hash}") _ExternalData_random(random) set(tmp "${obj}.tmp${random}") set(found 0) set(tried "") foreach(url_template IN LISTS ExternalData_URL_TEMPLATES) string(REPLACE "%(hash)" "${hash}" url_tmp "${url_template}") string(REPLACE "%(algo)" "${algo}" url "${url_tmp}") message(STATUS "Fetching \"${url}\"") _ExternalData_download_file("${url}" "${tmp}" err errMsg) set(tried "${tried}\n ${url}") if(err) set(tried "${tried} (${errMsg})") else() # Verify downloaded object. _ExternalData_compute_hash(dl_hash "${algo}" "${tmp}") if("${dl_hash}" STREQUAL "${hash}") set(found 1) break() else() set(tried "${tried} (wrong hash ${algo}=${dl_hash})") if("$ENV{ExternalData_DEBUG_DOWNLOAD}" MATCHES ".") file(RENAME "${tmp}" "${store}/${algo}/${dl_hash}") endif() endif() endif() file(REMOVE "${tmp}") endforeach() get_filename_component(dir "${name}" PATH) set(staged "${dir}/.ExternalData_${algo}_${hash}") if(found) file(RENAME "${tmp}" "${obj}") message(STATUS "Downloaded object: \"${obj}\"") elseif(EXISTS "${staged}") set(obj "${staged}") message(STATUS "Staged object: \"${obj}\"") else() message(FATAL_ERROR "Object ${algo}=${hash} not found at:${tried}") endif() set("${var_obj}" "${obj}" PARENT_SCOPE) endfunction() if("${ExternalData_ACTION}" STREQUAL "fetch") foreach(v ExternalData_OBJECT_STORES file name ext) if(NOT DEFINED "${v}") message(FATAL_ERROR "No \"-D${v}=\" value provided!") endif() endforeach() file(READ "${name}${ext}" hash) string(STRIP "${hash}" hash) if("${ext}" MATCHES "^\\.(${_ExternalData_REGEX_EXT})$") string(TOUPPER "${CMAKE_MATCH_1}" algo) else() message(FATAL_ERROR "Unknown hash algorithm extension \"${ext}\"") endif() _ExternalData_download_object("${name}" "${hash}" "${algo}" obj) # Check if file already corresponds to the object. set(stamp "${ext}-stamp") set(file_up_to_date 0) if(EXISTS "${file}" AND EXISTS "${file}${stamp}") file(READ "${file}${stamp}" f_hash) string(STRIP "${f_hash}" f_hash) if("${f_hash}" STREQUAL "${hash}") #message(STATUS "File already corresponds to object") set(file_up_to_date 1) endif() endif() if(file_up_to_date) # Touch the file to convince the build system it is up to date. execute_process(COMMAND "${CMAKE_COMMAND}" -E touch "${file}") else() _ExternalData_link_or_copy("${obj}" "${file}") endif() # Atomically update the hash/timestamp file to record the object referenced. _ExternalData_atomic_write("${file}${stamp}" "${hash}\n") elseif("${ExternalData_ACTION}" STREQUAL "local") foreach(v file name) if(NOT DEFINED "${v}") message(FATAL_ERROR "No \"-D${v}=\" value provided!") endif() endforeach() _ExternalData_link_or_copy("${name}" "${file}") else() message(FATAL_ERROR "Unknown ExternalData_ACTION=[${ExternalData_ACTION}]") endif()
Close