Linux websever 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64
Apache/2.4.52 (Ubuntu)
: 192.168.3.70 | : 192.168.1.99
Cant Read [ /etc/named.conf ]
8.1.2-1ubuntu2.23
urlab
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-3.22 /
Modules /
[ HOME SHELL ]
Name
Size
Permission
Action
AndroidTestUtilities
[ DIR ]
drwxr-xr-x
CMakeAddFortranSubdirectory
[ DIR ]
drwxr-xr-x
CheckIPOSupported
[ DIR ]
drwxr-xr-x
Compiler
[ DIR ]
drwxr-xr-x
CompilerId
[ DIR ]
drwxr-xr-x
FetchContent
[ DIR ]
drwxr-xr-x
FindCUDA
[ DIR ]
drwxr-xr-x
FindMPI
[ DIR ]
drwxr-xr-x
FindPython
[ DIR ]
drwxr-xr-x
FortranCInterface
[ DIR ]
drwxr-xr-x
IntelVSImplicitPath
[ DIR ]
drwxr-xr-x
Internal
[ DIR ]
drwxr-xr-x
Platform
[ DIR ]
drwxr-xr-x
UseJava
[ DIR ]
drwxr-xr-x
UseSWIG
[ DIR ]
drwxr-xr-x
AddFileDependencies.cmake
955
B
-rw-r--r--
AndroidTestUtilities.cmake
6.22
KB
-rw-r--r--
BasicConfigVersion-AnyNewerVer...
2.01
KB
-rw-r--r--
BasicConfigVersion-ExactVersio...
3.38
KB
-rw-r--r--
BasicConfigVersion-SameMajorVe...
2.91
KB
-rw-r--r--
BasicConfigVersion-SameMinorVe...
3.8
KB
-rw-r--r--
BundleUtilities.cmake
40.91
KB
-rw-r--r--
CMake.cmake
307
B
-rw-r--r--
CMakeASM-ATTInformation.cmake
566
B
-rw-r--r--
CMakeASMCompiler.cmake.in
942
B
-rw-r--r--
CMakeASMInformation.cmake
3.93
KB
-rw-r--r--
CMakeASM_MASMInformation.cmake
918
B
-rw-r--r--
CMakeASM_NASMInformation.cmake
1.96
KB
-rw-r--r--
CMakeAddFortranSubdirectory.cm...
7.13
KB
-rw-r--r--
CMakeAddNewLanguage.txt
1.49
KB
-rw-r--r--
CMakeBackwardCompatibilityC.cm...
2.54
KB
-rw-r--r--
CMakeBackwardCompatibilityCXX....
1.77
KB
-rw-r--r--
CMakeBorlandFindMake.cmake
271
B
-rw-r--r--
CMakeBuildSettings.cmake.in
681
B
-rw-r--r--
CMakeCCompiler.cmake.in
2.96
KB
-rw-r--r--
CMakeCCompilerABI.c
511
B
-rw-r--r--
CMakeCCompilerId.c.in
2.85
KB
-rw-r--r--
CMakeCInformation.cmake
6.74
KB
-rw-r--r--
CMakeCSharpCompiler.cmake.in
477
B
-rw-r--r--
CMakeCSharpCompilerId.cs.in
1.59
KB
-rw-r--r--
CMakeCSharpInformation.cmake
2.94
KB
-rw-r--r--
CMakeCUDACompiler.cmake.in
3.27
KB
-rw-r--r--
CMakeCUDACompilerABI.cu
394
B
-rw-r--r--
CMakeCUDACompilerId.cu.in
1.7
KB
-rw-r--r--
CMakeCUDAInformation.cmake
8.78
KB
-rw-r--r--
CMakeCXXCompiler.cmake.in
3.52
KB
-rw-r--r--
CMakeCXXCompilerABI.cpp
388
B
-rw-r--r--
CMakeCXXCompilerId.cpp.in
2.82
KB
-rw-r--r--
CMakeCXXInformation.cmake
9.96
KB
-rw-r--r--
CMakeCheckCompilerFlagCommonPa...
2.1
KB
-rw-r--r--
CMakeCommonLanguageInclude.cma...
1.12
KB
-rw-r--r--
CMakeCompilerABI.h
1.54
KB
-rw-r--r--
CMakeCompilerIdDetection.cmake
4.72
KB
-rw-r--r--
CMakeConfigurableFile.in
34
B
-rw-r--r--
CMakeDependentOption.cmake
3.04
KB
-rw-r--r--
CMakeDetermineASM-ATTCompiler....
394
B
-rw-r--r--
CMakeDetermineASMCompiler.cmak...
11.34
KB
-rw-r--r--
CMakeDetermineASM_MASMCompiler...
586
B
-rw-r--r--
CMakeDetermineASM_NASMCompiler...
937
B
-rw-r--r--
CMakeDetermineCCompiler.cmake
8.38
KB
-rw-r--r--
CMakeDetermineCSharpCompiler.c...
1.63
KB
-rw-r--r--
CMakeDetermineCUDACompiler.cma...
29.12
KB
-rw-r--r--
CMakeDetermineCXXCompiler.cmak...
8.5
KB
-rw-r--r--
CMakeDetermineCompileFeatures....
9.08
KB
-rw-r--r--
CMakeDetermineCompiler.cmake
6.77
KB
-rw-r--r--
CMakeDetermineCompilerABI.cmak...
8.27
KB
-rw-r--r--
CMakeDetermineCompilerId.cmake
47.83
KB
-rw-r--r--
CMakeDetermineFortranCompiler....
12.07
KB
-rw-r--r--
CMakeDetermineHIPCompiler.cmak...
6.81
KB
-rw-r--r--
CMakeDetermineISPCCompiler.cma...
2.97
KB
-rw-r--r--
CMakeDetermineJavaCompiler.cma...
3.67
KB
-rw-r--r--
CMakeDetermineOBJCCompiler.cma...
7.28
KB
-rw-r--r--
CMakeDetermineOBJCXXCompiler.c...
7.65
KB
-rw-r--r--
CMakeDetermineRCCompiler.cmake
2.05
KB
-rw-r--r--
CMakeDetermineSwiftCompiler.cm...
2.93
KB
-rw-r--r--
CMakeDetermineSystem.cmake
8.44
KB
-rw-r--r--
CMakeDetermineVSServicePack.cm...
5.89
KB
-rw-r--r--
CMakeExpandImportedTargets.cma...
5.95
KB
-rw-r--r--
CMakeExportBuildSettings.cmake
1.21
KB
-rw-r--r--
CMakeExtraGeneratorDetermineCo...
5.12
KB
-rw-r--r--
CMakeFindBinUtils.cmake
9.86
KB
-rw-r--r--
CMakeFindCodeBlocks.cmake
1.72
KB
-rw-r--r--
CMakeFindDependencyMacro.cmake
2.11
KB
-rw-r--r--
CMakeFindEclipseCDT4.cmake
4.84
KB
-rw-r--r--
CMakeFindFrameworks.cmake
1.54
KB
-rw-r--r--
CMakeFindJavaCommon.cmake
1
KB
-rw-r--r--
CMakeFindKate.cmake
1.02
KB
-rw-r--r--
CMakeFindPackageMode.cmake
6.1
KB
-rw-r--r--
CMakeFindSublimeText2.cmake
1.01
KB
-rw-r--r--
CMakeFindWMake.cmake
272
B
-rw-r--r--
CMakeFindXCode.cmake
250
B
-rw-r--r--
CMakeForceCompiler.cmake
4.11
KB
-rw-r--r--
CMakeFortranCompiler.cmake.in
2.67
KB
-rw-r--r--
CMakeFortranCompilerABI.F
1.09
KB
-rw-r--r--
CMakeFortranCompilerABI.F90
1.08
KB
-rw-r--r--
CMakeFortranCompilerId.F.in
9.88
KB
-rw-r--r--
CMakeFortranInformation.cmake
8.82
KB
-rw-r--r--
CMakeGenericSystem.cmake
6.64
KB
-rw-r--r--
CMakeGraphVizOptions.cmake
3.73
KB
-rw-r--r--
CMakeHIPCompiler.cmake.in
2.57
KB
-rw-r--r--
CMakeHIPCompilerABI.hip
293
B
-rw-r--r--
CMakeHIPCompilerId.hip.in
1.6
KB
-rw-r--r--
CMakeHIPInformation.cmake
5.51
KB
-rw-r--r--
CMakeIOSInstallCombined.cmake
10.2
KB
-rw-r--r--
CMakeISPCCompiler.cmake.in
1.15
KB
-rw-r--r--
CMakeISPCCompilerABI.ispc
545
B
-rw-r--r--
CMakeISPCCompilerId.ispc.in
2.09
KB
-rw-r--r--
CMakeISPCInformation.cmake
2.35
KB
-rw-r--r--
CMakeImportBuildSettings.cmake
535
B
-rw-r--r--
CMakeInitializeConfigs.cmake
1.54
KB
-rw-r--r--
CMakeJOMFindMake.cmake
270
B
-rw-r--r--
CMakeJavaCompiler.cmake.in
538
B
-rw-r--r--
CMakeJavaInformation.cmake
1.74
KB
-rw-r--r--
CMakeLanguageInformation.cmake
1.23
KB
-rw-r--r--
CMakeMSYSFindMake.cmake
489
B
-rw-r--r--
CMakeMinGWFindMake.cmake
437
B
-rw-r--r--
CMakeNMakeFindMake.cmake
272
B
-rw-r--r--
CMakeNinjaFindMake.cmake
315
B
-rw-r--r--
CMakeOBJCCompiler.cmake.in
3.16
KB
-rw-r--r--
CMakeOBJCCompilerABI.m
556
B
-rw-r--r--
CMakeOBJCCompilerId.m.in
2.06
KB
-rw-r--r--
CMakeOBJCInformation.cmake
7.1
KB
-rw-r--r--
CMakeOBJCXXCompiler.cmake.in
3.64
KB
-rw-r--r--
CMakeOBJCXXCompilerABI.mm
557
B
-rw-r--r--
CMakeOBJCXXCompilerId.mm.in
2.03
KB
-rw-r--r--
CMakeOBJCXXInformation.cmake
10.43
KB
-rw-r--r--
CMakePackageConfigHelpers.cmak...
13.97
KB
-rw-r--r--
CMakeParseArguments.cmake
581
B
-rw-r--r--
CMakeParseImplicitIncludeInfo....
9.54
KB
-rw-r--r--
CMakeParseImplicitLinkInfo.cma...
11.26
KB
-rw-r--r--
CMakeParseLibraryArchitecture....
1.69
KB
-rw-r--r--
CMakePlatformId.h.in
7.95
KB
-rw-r--r--
CMakePrintHelpers.cmake
4.17
KB
-rw-r--r--
CMakePrintSystemInformation.cm...
2.14
KB
-rw-r--r--
CMakePushCheckState.cmake
3.85
KB
-rw-r--r--
CMakeRCCompiler.cmake.in
270
B
-rw-r--r--
CMakeRCInformation.cmake
1.94
KB
-rw-r--r--
CMakeSwiftCompiler.cmake.in
635
B
-rw-r--r--
CMakeSwiftInformation.cmake
5.21
KB
-rw-r--r--
CMakeSystem.cmake.in
563
B
-rw-r--r--
CMakeSystemSpecificInformation...
2.34
KB
-rw-r--r--
CMakeSystemSpecificInitialize....
1
KB
-rw-r--r--
CMakeTestASM-ATTCompiler.cmake
527
B
-rw-r--r--
CMakeTestASMCompiler.cmake
865
B
-rw-r--r--
CMakeTestASM_MASMCompiler.cmak...
556
B
-rw-r--r--
CMakeTestASM_NASMCompiler.cmak...
529
B
-rw-r--r--
CMakeTestCCompiler.cmake
3.9
KB
-rw-r--r--
CMakeTestCSharpCompiler.cmake
2.79
KB
-rw-r--r--
CMakeTestCUDACompiler.cmake
4.24
KB
-rw-r--r--
CMakeTestCXXCompiler.cmake
3.8
KB
-rw-r--r--
CMakeTestCompilerCommon.cmake
1.3
KB
-rw-r--r--
CMakeTestFortranCompiler.cmake
4.68
KB
-rw-r--r--
CMakeTestGNU.c
268
B
-rw-r--r--
CMakeTestHIPCompiler.cmake
3.96
KB
-rw-r--r--
CMakeTestISPCCompiler.cmake
1.42
KB
-rw-r--r--
CMakeTestJavaCompiler.cmake
484
B
-rw-r--r--
CMakeTestOBJCCompiler.cmake
4.02
KB
-rw-r--r--
CMakeTestOBJCXXCompiler.cmake
4.05
KB
-rw-r--r--
CMakeTestRCCompiler.cmake
573
B
-rw-r--r--
CMakeTestSwiftCompiler.cmake
2.94
KB
-rw-r--r--
CMakeUnixFindMake.cmake
575
B
-rw-r--r--
CMakeVerifyManifest.cmake
3.88
KB
-rw-r--r--
CPack.cmake
35.12
KB
-rw-r--r--
CPackComponent.cmake
20.26
KB
-rw-r--r--
CPackIFW.cmake
25.82
KB
-rw-r--r--
CPackIFWConfigureFile.cmake
2.21
KB
-rw-r--r--
CSharpUtilities.cmake
10.73
KB
-rw-r--r--
CTest.cmake
9
KB
-rw-r--r--
CTestCoverageCollectGCOV.cmake
11.98
KB
-rw-r--r--
CTestScriptMode.cmake
662
B
-rw-r--r--
CTestTargets.cmake
3.09
KB
-rw-r--r--
CTestUseLaunchers.cmake
2.92
KB
-rw-r--r--
CheckCCompilerFlag.cmake
1.5
KB
-rw-r--r--
CheckCSourceCompiles.cmake
3.24
KB
-rw-r--r--
CheckCSourceRuns.cmake
3.19
KB
-rw-r--r--
CheckCXXCompilerFlag.cmake
1.53
KB
-rw-r--r--
CheckCXXSourceCompiles.cmake
3.26
KB
-rw-r--r--
CheckCXXSourceRuns.cmake
3.21
KB
-rw-r--r--
CheckCXXSymbolExists.cmake
3.08
KB
-rw-r--r--
CheckCompilerFlag.cmake
1.51
KB
-rw-r--r--
CheckForPthreads.c
273
B
-rw-r--r--
CheckFortranCompilerFlag.cmake
1.59
KB
-rw-r--r--
CheckFortranFunctionExists.cma...
3.11
KB
-rw-r--r--
CheckFortranSourceCompiles.cma...
4.15
KB
-rw-r--r--
CheckFortranSourceRuns.cmake
3.96
KB
-rw-r--r--
CheckFunctionExists.c
433
B
-rw-r--r--
CheckFunctionExists.cmake
4.41
KB
-rw-r--r--
CheckIPOSupported.cmake
6.68
KB
-rw-r--r--
CheckIncludeFile.c.in
130
B
-rw-r--r--
CheckIncludeFile.cmake
4.85
KB
-rw-r--r--
CheckIncludeFile.cxx.in
65
B
-rw-r--r--
CheckIncludeFileCXX.cmake
4.88
KB
-rw-r--r--
CheckIncludeFiles.cmake
6.43
KB
-rw-r--r--
CheckLanguage.cmake
4.31
KB
-rw-r--r--
CheckLibraryExists.cmake
3.59
KB
-rw-r--r--
CheckLibraryExists.lists.in
298
B
-rw-r--r--
CheckLinkerFlag.cmake
3.2
KB
-rw-r--r--
CheckOBJCCompilerFlag.cmake
1.56
KB
-rw-r--r--
CheckOBJCSourceCompiles.cmake
3.25
KB
-rw-r--r--
CheckOBJCSourceRuns.cmake
3.21
KB
-rw-r--r--
CheckOBJCXXCompilerFlag.cmake
1.58
KB
-rw-r--r--
CheckOBJCXXSourceCompiles.cmak...
3.28
KB
-rw-r--r--
CheckOBJCXXSourceRuns.cmake
3.23
KB
-rw-r--r--
CheckPIESupported.cmake
4.53
KB
-rw-r--r--
CheckPrototypeDefinition.c.in
514
B
-rw-r--r--
CheckPrototypeDefinition.cmake
4.46
KB
-rw-r--r--
CheckSizeOf.cmake
348
B
-rw-r--r--
CheckSourceCompiles.cmake
3.49
KB
-rw-r--r--
CheckSourceRuns.cmake
3.37
KB
-rw-r--r--
CheckStructHasMember.cmake
2.49
KB
-rw-r--r--
CheckSymbolExists.cmake
6.62
KB
-rw-r--r--
CheckTypeSize.c.in
1.21
KB
-rw-r--r--
CheckTypeSize.cmake
10.04
KB
-rw-r--r--
CheckTypeSizeMap.cmake.in
31
B
-rw-r--r--
CheckVariableExists.c
382
B
-rw-r--r--
CheckVariableExists.cmake
2.9
KB
-rw-r--r--
Dart.cmake
3.74
KB
-rw-r--r--
DartConfiguration.tcl.in
3.16
KB
-rw-r--r--
DeployQt4.cmake
12.63
KB
-rw-r--r--
Documentation.cmake
2.24
KB
-rw-r--r--
DummyCXXFile.cxx
27
B
-rw-r--r--
ExternalData.cmake
44.33
KB
-rw-r--r--
ExternalData_config.cmake.in
355
B
-rw-r--r--
ExternalProject-download.cmake...
4.07
KB
-rw-r--r--
ExternalProject-gitupdate.cmak...
9.65
KB
-rw-r--r--
ExternalProject-verify.cmake.i...
904
B
-rw-r--r--
ExternalProject.cmake
136.1
KB
-rw-r--r--
FLTKCompatibility.cmake
170
B
-rw-r--r--
FeatureSummary.cmake
27.97
KB
-rw-r--r--
FetchContent.cmake
52.08
KB
-rw-r--r--
FindALSA.cmake
2.18
KB
-rw-r--r--
FindASPELL.cmake
1.02
KB
-rw-r--r--
FindAVIFile.cmake
1.35
KB
-rw-r--r--
FindArmadillo.cmake
4.98
KB
-rw-r--r--
FindBISON.cmake
10.75
KB
-rw-r--r--
FindBLAS.cmake
35.92
KB
-rw-r--r--
FindBZip2.cmake
3.5
KB
-rw-r--r--
FindBacktrace.cmake
3.44
KB
-rw-r--r--
FindBoost.cmake
112.93
KB
-rw-r--r--
FindBullet.cmake
2.75
KB
-rw-r--r--
FindCABLE.cmake
2.54
KB
-rw-r--r--
FindCUDA.cmake
85.67
KB
-rw-r--r--
FindCUDAToolkit.cmake
33.19
KB
-rw-r--r--
FindCURL.cmake
7.2
KB
-rw-r--r--
FindCVS.cmake
1.94
KB
-rw-r--r--
FindCoin3D.cmake
2.25
KB
-rw-r--r--
FindCups.cmake
3.37
KB
-rw-r--r--
FindCurses.cmake
9.2
KB
-rw-r--r--
FindCxxTest.cmake
7.57
KB
-rw-r--r--
FindCygwin.cmake
870
B
-rw-r--r--
FindDCMTK.cmake
10.25
KB
-rw-r--r--
FindDart.cmake
949
B
-rw-r--r--
FindDevIL.cmake
3.78
KB
-rw-r--r--
FindDoxygen.cmake
41.4
KB
-rw-r--r--
FindEXPAT.cmake
2.67
KB
-rw-r--r--
FindEnvModules.cmake
9.73
KB
-rw-r--r--
FindFLEX.cmake
8.46
KB
-rw-r--r--
FindFLTK.cmake
10.8
KB
-rw-r--r--
FindFLTK2.cmake
7.5
KB
-rw-r--r--
FindFontconfig.cmake
2.89
KB
-rw-r--r--
FindFreetype.cmake
5.97
KB
-rw-r--r--
FindGCCXML.cmake
672
B
-rw-r--r--
FindGDAL.cmake
6.46
KB
-rw-r--r--
FindGIF.cmake
3.79
KB
-rw-r--r--
FindGLEW.cmake
10.77
KB
-rw-r--r--
FindGLU.cmake
554
B
-rw-r--r--
FindGLUT.cmake
6.81
KB
-rw-r--r--
FindGSL.cmake
8.86
KB
-rw-r--r--
FindGTK.cmake
3.79
KB
-rw-r--r--
FindGTK2.cmake
36.88
KB
-rw-r--r--
FindGTest.cmake
11.76
KB
-rw-r--r--
FindGettext.cmake
7.81
KB
-rw-r--r--
FindGit.cmake
4.09
KB
-rw-r--r--
FindGnuTLS.cmake
2.44
KB
-rw-r--r--
FindGnuplot.cmake
1.65
KB
-rw-r--r--
FindHDF5.cmake
46.84
KB
-rw-r--r--
FindHSPELL.cmake
1.64
KB
-rw-r--r--
FindHTMLHelp.cmake
1.43
KB
-rw-r--r--
FindHg.cmake
3
KB
-rw-r--r--
FindICU.cmake
15.73
KB
-rw-r--r--
FindIce.cmake
23.82
KB
-rw-r--r--
FindIconv.cmake
5.79
KB
-rw-r--r--
FindIcotool.cmake
1.3
KB
-rw-r--r--
FindImageMagick.cmake
11.56
KB
-rw-r--r--
FindIntl.cmake
5.38
KB
-rw-r--r--
FindJNI.cmake
13.5
KB
-rw-r--r--
FindJPEG.cmake
4.21
KB
-rw-r--r--
FindJasper.cmake
2.96
KB
-rw-r--r--
FindJava.cmake
12.64
KB
-rw-r--r--
FindKDE3.cmake
9.91
KB
-rw-r--r--
FindKDE4.cmake
3.12
KB
-rw-r--r--
FindLAPACK.cmake
21.25
KB
-rw-r--r--
FindLATEX.cmake
6.5
KB
-rw-r--r--
FindLTTngUST.cmake
3.6
KB
-rw-r--r--
FindLibArchive.cmake
2.87
KB
-rw-r--r--
FindLibLZMA.cmake
5.24
KB
-rw-r--r--
FindLibXml2.cmake
4.12
KB
-rw-r--r--
FindLibXslt.cmake
4.75
KB
-rw-r--r--
FindLibinput.cmake
2.13
KB
-rw-r--r--
FindLua.cmake
8.25
KB
-rw-r--r--
FindLua50.cmake
2.34
KB
-rw-r--r--
FindLua51.cmake
2.23
KB
-rw-r--r--
FindMFC.cmake
2.43
KB
-rw-r--r--
FindMPEG.cmake
1.21
KB
-rw-r--r--
FindMPEG2.cmake
1.39
KB
-rw-r--r--
FindMPI.cmake
91.84
KB
-rw-r--r--
FindMatlab.cmake
66.5
KB
-rw-r--r--
FindMotif.cmake
917
B
-rw-r--r--
FindMsys.cmake
894
B
-rw-r--r--
FindODBC.cmake
7.01
KB
-rw-r--r--
FindOpenACC.cmake
9.92
KB
-rw-r--r--
FindOpenAL.cmake
3.21
KB
-rw-r--r--
FindOpenCL.cmake
4.86
KB
-rw-r--r--
FindOpenGL.cmake
20.19
KB
-rw-r--r--
FindOpenMP.cmake
25.53
KB
-rw-r--r--
FindOpenSSL.cmake
23.12
KB
-rw-r--r--
FindOpenSceneGraph.cmake
7.23
KB
-rw-r--r--
FindOpenThreads.cmake
3.41
KB
-rw-r--r--
FindPHP4.cmake
2.11
KB
-rw-r--r--
FindPNG.cmake
5.74
KB
-rw-r--r--
FindPackageHandleStandardArgs....
22.41
KB
-rw-r--r--
FindPackageMessage.cmake
1.67
KB
-rw-r--r--
FindPatch.cmake
1.77
KB
-rw-r--r--
FindPerl.cmake
2.93
KB
-rw-r--r--
FindPerlLibs.cmake
5.15
KB
-rw-r--r--
FindPhysFS.cmake
1.12
KB
-rw-r--r--
FindPike.cmake
922
B
-rw-r--r--
FindPkgConfig.cmake
35.63
KB
-rw-r--r--
FindPostgreSQL.cmake
12.23
KB
-rw-r--r--
FindProducer.cmake
2.24
KB
-rw-r--r--
FindProtobuf.cmake
23.4
KB
-rw-r--r--
FindPython.cmake
19.65
KB
-rw-r--r--
FindPython2.cmake
14.14
KB
-rw-r--r--
FindPython3.cmake
16.21
KB
-rw-r--r--
FindPythonInterp.cmake
7.15
KB
-rw-r--r--
FindPythonLibs.cmake
15.85
KB
-rw-r--r--
FindQt.cmake
6.31
KB
-rw-r--r--
FindQt3.cmake
9.46
KB
-rw-r--r--
FindQt4.cmake
52.5
KB
-rw-r--r--
FindQuickTime.cmake
1011
B
-rw-r--r--
FindRTI.cmake
3.22
KB
-rw-r--r--
FindRuby.cmake
18.04
KB
-rw-r--r--
FindSDL.cmake
7.92
KB
-rw-r--r--
FindSDL_image.cmake
3.81
KB
-rw-r--r--
FindSDL_mixer.cmake
3.81
KB
-rw-r--r--
FindSDL_net.cmake
3.63
KB
-rw-r--r--
FindSDL_sound.cmake
12.33
KB
-rw-r--r--
FindSDL_ttf.cmake
3.63
KB
-rw-r--r--
FindSQLite3.cmake
2
KB
-rw-r--r--
FindSWIG.cmake
5.41
KB
-rw-r--r--
FindSelfPackers.cmake
1.59
KB
-rw-r--r--
FindSquish.cmake
9.26
KB
-rw-r--r--
FindSubversion.cmake
6.24
KB
-rw-r--r--
FindTCL.cmake
8.05
KB
-rw-r--r--
FindTIFF.cmake
6.54
KB
-rw-r--r--
FindTclStub.cmake
4.46
KB
-rw-r--r--
FindTclsh.cmake
3.6
KB
-rw-r--r--
FindThreads.cmake
8.22
KB
-rw-r--r--
FindUnixCommands.cmake
1.5
KB
-rw-r--r--
FindVulkan.cmake
4.53
KB
-rw-r--r--
FindWget.cmake
968
B
-rw-r--r--
FindWish.cmake
2.72
KB
-rw-r--r--
FindX11.cmake
34.81
KB
-rw-r--r--
FindXCTest.cmake
7.19
KB
-rw-r--r--
FindXMLRPC.cmake
3.98
KB
-rw-r--r--
FindXalanC.cmake
5.85
KB
-rw-r--r--
FindXercesC.cmake
5.53
KB
-rw-r--r--
FindZLIB.cmake
4.94
KB
-rw-r--r--
Findosg.cmake
1.88
KB
-rw-r--r--
FindosgAnimation.cmake
1.87
KB
-rw-r--r--
FindosgDB.cmake
1.77
KB
-rw-r--r--
FindosgFX.cmake
1.76
KB
-rw-r--r--
FindosgGA.cmake
1.77
KB
-rw-r--r--
FindosgIntrospection.cmake
1.96
KB
-rw-r--r--
FindosgManipulator.cmake
1.93
KB
-rw-r--r--
FindosgParticle.cmake
1.86
KB
-rw-r--r--
FindosgPresentation.cmake
2.02
KB
-rw-r--r--
FindosgProducer.cmake
1.87
KB
-rw-r--r--
FindosgQt.cmake
1.82
KB
-rw-r--r--
FindosgShadow.cmake
1.83
KB
-rw-r--r--
FindosgSim.cmake
1.77
KB
-rw-r--r--
FindosgTerrain.cmake
1.84
KB
-rw-r--r--
FindosgText.cmake
1.77
KB
-rw-r--r--
FindosgUtil.cmake
1.78
KB
-rw-r--r--
FindosgViewer.cmake
1.82
KB
-rw-r--r--
FindosgVolume.cmake
1.82
KB
-rw-r--r--
FindosgWidget.cmake
1.87
KB
-rw-r--r--
Findosg_functions.cmake
2.08
KB
-rw-r--r--
FindwxWidgets.cmake
42.99
KB
-rw-r--r--
FindwxWindows.cmake
23.82
KB
-rw-r--r--
FortranCInterface.cmake
14.18
KB
-rw-r--r--
GNUInstallDirs.cmake
16.67
KB
-rw-r--r--
GenerateExportHeader.cmake
15.23
KB
-rw-r--r--
GetPrerequisites.cmake
33.28
KB
-rw-r--r--
GoogleTest.cmake
23.34
KB
-rw-r--r--
GoogleTestAddTests.cmake
5.95
KB
-rw-r--r--
ITKCompatibility.cmake
224
B
-rw-r--r--
InstallRequiredSystemLibraries...
30.45
KB
-rw-r--r--
KDE3Macros.cmake
12.39
KB
-rw-r--r--
MacOSXBundleInfo.plist.in
1.19
KB
-rw-r--r--
MacOSXFrameworkInfo.plist.in
886
B
-rw-r--r--
MacroAddFileDependencies.cmake
848
B
-rw-r--r--
MatlabTestsRedirect.cmake
3.39
KB
-rw-r--r--
ProcessorCount.cmake
8.54
KB
-rw-r--r--
Qt4ConfigDependentSettings.cma...
7.61
KB
-rw-r--r--
Qt4Macros.cmake
18.79
KB
-rw-r--r--
RepositoryInfo.txt.in
56
B
-rw-r--r--
SelectLibraryConfigurations.cm...
3.21
KB
-rw-r--r--
Squish4RunTestCase.bat
648
B
-rw-r--r--
Squish4RunTestCase.sh
631
B
-rwxr-xr-x
SquishRunTestCase.bat
219
B
-rw-r--r--
SquishRunTestCase.sh
272
B
-rwxr-xr-x
SquishTestScript.cmake
3.41
KB
-rw-r--r--
SystemInformation.cmake
3.12
KB
-rw-r--r--
SystemInformation.in
4.59
KB
-rw-r--r--
TestBigEndian.cmake
5.27
KB
-rw-r--r--
TestCXXAcceptsFlag.cmake
1.43
KB
-rw-r--r--
TestEndianess.c.in
871
B
-rw-r--r--
TestForANSIForScope.cmake
1.45
KB
-rw-r--r--
TestForANSIStreamHeaders.cmake
1.04
KB
-rw-r--r--
TestForANSIStreamHeaders.cxx
61
B
-rw-r--r--
TestForAnsiForScope.cxx
96
B
-rw-r--r--
TestForSSTREAM.cmake
1.4
KB
-rw-r--r--
TestForSSTREAM.cxx
150
B
-rw-r--r--
TestForSTDNamespace.cmake
1.37
KB
-rw-r--r--
TestForSTDNamespace.cxx
76
B
-rw-r--r--
UseEcos.cmake
9.7
KB
-rw-r--r--
UseJava.cmake
61.87
KB
-rw-r--r--
UsePkgConfig.cmake
2.65
KB
-rw-r--r--
UseQt4.cmake
3.62
KB
-rw-r--r--
UseSWIG.cmake
40.72
KB
-rw-r--r--
Use_wxWindows.cmake
2.1
KB
-rw-r--r--
UsewxWidgets.cmake
3.03
KB
-rw-r--r--
VTKCompatibility.cmake
1.78
KB
-rw-r--r--
WriteBasicConfigVersionFile.cm...
1.65
KB
-rw-r--r--
WriteCompilerDetectionHeader.c...
30.97
KB
-rw-r--r--
ecos_clean.cmake
492
B
-rw-r--r--
exportheader.cmake.in
1.08
KB
-rw-r--r--
kde3init_dummy.cpp.in
227
B
-rw-r--r--
kde3uic.cmake
723
B
-rw-r--r--
readme.txt
233
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : CMakeDetermineCompilerId.cmake
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. macro(__determine_compiler_id_test testflags_var userflags_var) separate_arguments(testflags UNIX_COMMAND "${${testflags_var}}") CMAKE_DETERMINE_COMPILER_ID_BUILD("${lang}" "${testflags}" "${${userflags_var}}" "${src}") CMAKE_DETERMINE_COMPILER_ID_MATCH_VENDOR("${lang}" "${COMPILER_${lang}_PRODUCED_OUTPUT}") if(NOT CMAKE_${lang}_COMPILER_ID) foreach(file ${COMPILER_${lang}_PRODUCED_FILES}) CMAKE_DETERMINE_COMPILER_ID_CHECK("${lang}" "${CMAKE_${lang}_COMPILER_ID_DIR}/${file}" "${src}") endforeach() endif() endmacro() # Function to compile a source file to identify the compiler. This is # used internally by CMake and should not be included by user code. # If successful, sets CMAKE_<lang>_COMPILER_ID and CMAKE_<lang>_PLATFORM_ID 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) string(REGEX REPLACE " +" ";" CMAKE_${lang}_COMPILER_ID_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}) elseif(DEFINED ENV{${flagvar}}) set(CMAKE_${lang}_COMPILER_ID_FLAGS $ENV{${flagvar}}) else(CMAKE_${lang}_FLAGS_INIT) set(CMAKE_${lang}_COMPILER_ID_FLAGS ${CMAKE_${lang}_FLAGS_INIT}) endif() string(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_PLATFORM_INFO_DIR}/CompilerId${lang}) # If we REQUIRE_SUCCESS, i.e. TEST_FLAGS_FIRST has the correct flags, we still need to # try two combinations: with COMPILER_ID_FLAGS (from user) and without (see issue #21869). if(CMAKE_${lang}_COMPILER_ID_REQUIRE_SUCCESS) # If there COMPILER_ID_FLAGS is empty we can error for the first invocation. if("${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}" STREQUAL "") set(__compiler_id_require_success TRUE) endif() foreach(userflags "${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}" "") set(testflags "${CMAKE_${lang}_COMPILER_ID_TEST_FLAGS_FIRST}") __determine_compiler_id_test(testflags userflags) if(CMAKE_${lang}_COMPILER_ID) break() endif() set(__compiler_id_require_success TRUE) endforeach() else() # Try building with no extra flags and then try each set # of helper flags. Stop when the compiler is identified. foreach(userflags "${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}" "") foreach(testflags ${CMAKE_${lang}_COMPILER_ID_TEST_FLAGS_FIRST} "" ${CMAKE_${lang}_COMPILER_ID_TEST_FLAGS}) __determine_compiler_id_test(testflags userflags) if(CMAKE_${lang}_COMPILER_ID) break() endif() endforeach() if(CMAKE_${lang}_COMPILER_ID) break() endif() endforeach() endif() # Check if compiler id detection gave us the compiler tool. if(CMAKE_${lang}_COMPILER_ID_TOOL) set(CMAKE_${lang}_COMPILER "${CMAKE_${lang}_COMPILER_ID_TOOL}") set(CMAKE_${lang}_COMPILER "${CMAKE_${lang}_COMPILER_ID_TOOL}" PARENT_SCOPE) elseif(NOT CMAKE_${lang}_COMPILER) set(CMAKE_${lang}_COMPILER "CMAKE_${lang}_COMPILER-NOTFOUND" PARENT_SCOPE) endif() # If the compiler is still unknown, try to query its vendor. if(CMAKE_${lang}_COMPILER AND NOT CMAKE_${lang}_COMPILER_ID) foreach(userflags "${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}" "") CMAKE_DETERMINE_COMPILER_ID_VENDOR(${lang} "${userflags}") endforeach() endif() # If the compiler is still unknown, fallback to GHS if(NOT CMAKE_${lang}_COMPILER_ID AND "${CMAKE_GENERATOR}" MATCHES "Green Hills MULTI") set(CMAKE_${lang}_COMPILER_ID GHS) file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "The ${lang} compiler identification is falling back to GHS.\n\n") endif() # CUDA < 7.5 is missing version macros if(lang STREQUAL "CUDA" AND CMAKE_${lang}_COMPILER_ID STREQUAL "NVIDIA" AND NOT CMAKE_${lang}_COMPILER_VERSION) execute_process( COMMAND "${CMAKE_${lang}_COMPILER}" --version OUTPUT_VARIABLE output ERROR_VARIABLE output RESULT_VARIABLE result TIMEOUT 10 ) if(output MATCHES [=[ V([0-9]+)\.([0-9]+)\.([0-9]+)]=]) set(CMAKE_${lang}_COMPILER_VERSION "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3}") endif() endif() # For Swift we need to explicitly query the version. if(lang STREQUAL "Swift" AND CMAKE_${lang}_COMPILER AND NOT CMAKE_${lang}_COMPILER_VERSION) execute_process( COMMAND "${CMAKE_${lang}_COMPILER}" -version OUTPUT_VARIABLE output ERROR_VARIABLE output RESULT_VARIABLE result TIMEOUT 10 ) file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Running the ${lang} compiler: \"${CMAKE_${lang}_COMPILER}\" -version\n" "${output}\n" ) if(output MATCHES [[Swift version ([0-9]+\.[0-9]+(\.[0-9]+)?)]]) set(CMAKE_${lang}_COMPILER_VERSION "${CMAKE_MATCH_1}") if(NOT CMAKE_${lang}_COMPILER_ID) set(CMAKE_Swift_COMPILER_ID "Apple") endif() endif() endif() # For ISPC we need to explicitly query the version. if(lang STREQUAL "ISPC" AND CMAKE_${lang}_COMPILER AND NOT CMAKE_${lang}_COMPILER_VERSION) execute_process( COMMAND "${CMAKE_${lang}_COMPILER}" --version OUTPUT_VARIABLE output ERROR_VARIABLE output RESULT_VARIABLE result TIMEOUT 10 ) file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Running the ${lang} compiler: \"${CMAKE_${lang}_COMPILER}\" -version\n" "${output}\n" ) if(output MATCHES [[ISPC\), ([0-9]+\.[0-9]+(\.[0-9]+)?)]]) set(CMAKE_${lang}_COMPILER_VERSION "${CMAKE_MATCH_1}") endif() endif() if (COMPILER_QNXNTO AND CMAKE_${lang}_COMPILER_ID STREQUAL "GNU") execute_process( COMMAND "${CMAKE_${lang}_COMPILER}" -V OUTPUT_VARIABLE output ERROR_VARIABLE output RESULT_VARIABLE result TIMEOUT 10 ) if (output MATCHES "targets available") set(CMAKE_${lang}_COMPILER_ID QCC) # http://community.qnx.com/sf/discussion/do/listPosts/projects.community/discussion.qnx_momentics_community_support.topc3555?_pagenum=2 # The qcc driver does not itself have a version. endif() endif() # The Fujitsu compiler does not always convey version information through # preprocessor symbols so we extract through command line info if (CMAKE_${lang}_COMPILER_ID STREQUAL "Fujitsu") if(NOT CMAKE_${lang}_COMPILER_VERSION) execute_process( COMMAND "${CMAKE_${lang}_COMPILER}" -V OUTPUT_VARIABLE output ERROR_VARIABLE output RESULT_VARIABLE result TIMEOUT 10 ) if (result EQUAL 0) if (output MATCHES [[Fujitsu [^ ]* Compiler ([0-9]+\.[0-9]+\.[0-9]+)]]) set(CMAKE_${lang}_COMPILER_VERSION "${CMAKE_MATCH_1}") endif() endif() endif() endif() # 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() if((CMAKE_GENERATOR MATCHES "^Ninja" OR ((NOT DEFINED CMAKE_DEPENDS_USE_COMPILER OR CMAKE_DEPENDS_USE_COMPILER) AND CMAKE_GENERATOR MATCHES "Makefiles|WMake")) AND MSVC_${lang}_ARCHITECTURE_ID) foreach(userflags "${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}" "") CMAKE_DETERMINE_MSVC_SHOWINCLUDES_PREFIX(${lang} "${userflags}") endforeach() else() set(CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX "") endif() set(_variant "") if("x${CMAKE_${lang}_COMPILER_ID}" STREQUAL "xClang" OR "x${CMAKE_${lang}_COMPILER_ID}" STREQUAL "xIntelLLVM") if("x${CMAKE_${lang}_SIMULATE_ID}" STREQUAL "xMSVC") if(CMAKE_GENERATOR MATCHES "Visual Studio") set(CMAKE_${lang}_COMPILER_FRONTEND_VARIANT "MSVC") else() # Test whether an MSVC-like command-line option works. execute_process(COMMAND "${CMAKE_${lang}_COMPILER}" -? RESULT_VARIABLE _clang_result OUTPUT_VARIABLE _clang_stdout ERROR_VARIABLE _clang_stderr) if(_clang_result EQUAL 0) set(CMAKE_${lang}_COMPILER_FRONTEND_VARIANT "MSVC") else() set(CMAKE_${lang}_COMPILER_FRONTEND_VARIANT "GNU") endif() endif() set(_variant " with ${CMAKE_${lang}_COMPILER_FRONTEND_VARIANT}-like command-line") else() set(CMAKE_${lang}_COMPILER_FRONTEND_VARIANT "GNU") endif() elseif("x${CMAKE_${lang}_COMPILER_ID}" STREQUAL "xFujitsuClang") set(CMAKE_${lang}_COMPILER_FRONTEND_VARIANT "GNU") else() set(CMAKE_${lang}_COMPILER_FRONTEND_VARIANT "") endif() # Display the final identification result. if(CMAKE_${lang}_COMPILER_ID) if(CMAKE_${lang}_COMPILER_VERSION) set(_version " ${CMAKE_${lang}_COMPILER_VERSION}") else() set(_version "") endif() if(CMAKE_${lang}_COMPILER_ARCHITECTURE_ID AND "x${CMAKE_${lang}_COMPILER_ID}" STREQUAL "xIAR") set(_archid " ${CMAKE_${lang}_COMPILER_ARCHITECTURE_ID}") else() set(_archid "") endif() message(STATUS "The ${lang} compiler identification is " "${CMAKE_${lang}_COMPILER_ID}${_archid}${_version}${_variant}") unset(_archid) unset(_version) unset(_variant) else() message(STATUS "The ${lang} compiler identification is unknown") endif() if(lang STREQUAL "Fortran" AND CMAKE_${lang}_COMPILER_ID STREQUAL "XL") set(CMAKE_${lang}_XL_CPP "${CMAKE_${lang}_COMPILER_ID_CPP}" PARENT_SCOPE) endif() set(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE) set(CMAKE_${lang}_PLATFORM_ID "${CMAKE_${lang}_PLATFORM_ID}" PARENT_SCOPE) set(CMAKE_${lang}_COMPILER_ARCHITECTURE_ID "${CMAKE_${lang}_COMPILER_ARCHITECTURE_ID}" PARENT_SCOPE) set(MSVC_${lang}_ARCHITECTURE_ID "${MSVC_${lang}_ARCHITECTURE_ID}" PARENT_SCOPE) set(CMAKE_${lang}_XCODE_ARCHS "${CMAKE_${lang}_XCODE_ARCHS}" PARENT_SCOPE) set(CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX "${CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX}" PARENT_SCOPE) set(CMAKE_${lang}_COMPILER_FRONTEND_VARIANT "${CMAKE_${lang}_COMPILER_FRONTEND_VARIANT}" PARENT_SCOPE) set(CMAKE_${lang}_COMPILER_VERSION "${CMAKE_${lang}_COMPILER_VERSION}" PARENT_SCOPE) set(CMAKE_${lang}_COMPILER_VERSION_INTERNAL "${CMAKE_${lang}_COMPILER_VERSION_INTERNAL}" PARENT_SCOPE) set(CMAKE_${lang}_COMPILER_WRAPPER "${CMAKE_${lang}_COMPILER_WRAPPER}" PARENT_SCOPE) set(CMAKE_${lang}_SIMULATE_ID "${CMAKE_${lang}_SIMULATE_ID}" PARENT_SCOPE) set(CMAKE_${lang}_SIMULATE_VERSION "${CMAKE_${lang}_SIMULATE_VERSION}" PARENT_SCOPE) set(CMAKE_${lang}_STANDARD_COMPUTED_DEFAULT "${CMAKE_${lang}_STANDARD_COMPUTED_DEFAULT}" PARENT_SCOPE) set(CMAKE_${lang}_EXTENSIONS_COMPUTED_DEFAULT "${CMAKE_${lang}_EXTENSIONS_COMPUTED_DEFAULT}" PARENT_SCOPE) set(CMAKE_${lang}_COMPILER_PRODUCED_OUTPUT "${COMPILER_${lang}_PRODUCED_OUTPUT}" PARENT_SCOPE) set(CMAKE_${lang}_COMPILER_PRODUCED_FILES "${COMPILER_${lang}_PRODUCED_FILES}" PARENT_SCOPE) endfunction() include(CMakeCompilerIdDetection) #----------------------------------------------------------------------------- # Function to write the compiler id source file. function(CMAKE_DETERMINE_COMPILER_ID_WRITE lang src) find_file(src_in ${src}.in PATHS ${CMAKE_ROOT}/Modules ${CMAKE_MODULE_PATH} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) file(READ ${src_in} ID_CONTENT_IN) compiler_id_detection(CMAKE_${lang}_COMPILER_ID_CONTENT ${lang} ID_STRING VERSION_STRINGS PLATFORM_DEFAULT_COMPILER ) unset(src_in CACHE) string(CONFIGURE "${ID_CONTENT_IN}" ID_CONTENT_OUT @ONLY) file(WRITE ${CMAKE_${lang}_COMPILER_ID_DIR}/${src} "${ID_CONTENT_OUT}") endfunction() #----------------------------------------------------------------------------- # Function to build the compiler id source file and look for output # files. function(CMAKE_DETERMINE_COMPILER_ID_BUILD lang testflags userflags src) # Create a clean working directory. file(REMOVE_RECURSE ${CMAKE_${lang}_COMPILER_ID_DIR}) file(MAKE_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR}) file(MAKE_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR}/tmp) 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: ${userflags} Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS} ") # Compile the compiler identification source. if("${CMAKE_GENERATOR}" MATCHES "Visual Studio ([0-9]+)") set(vs_version ${CMAKE_MATCH_1}) set(id_platform ${CMAKE_VS_PLATFORM_NAME}) set(id_lang "${lang}") set(id_PostBuildEvent_Command "") if(CMAKE_VS_PLATFORM_TOOLSET MATCHES "^[Ll][Ll][Vv][Mm](_v[0-9]+(_xp)?)?$") set(id_cl_var "ClangClExecutable") elseif(CMAKE_VS_PLATFORM_TOOLSET MATCHES "^[Cc][Ll][Aa][Nn][Gg]([Cc][Ll]$|_[0-9])") set(id_cl "$(CLToolExe)") elseif(CMAKE_VS_PLATFORM_TOOLSET MATCHES "v[0-9]+_clang_.*") set(id_cl clang.exe) # Executable names have been chosen according documentation # URL: (https://software.intel.com/content/www/us/en/develop/documentation/get-started-with-dpcpp-compiler/top.html#top_GUID-A9B4C91D-97AC-450D-9742-9D895BC8AEE1) elseif(CMAKE_VS_PLATFORM_TOOLSET MATCHES "Intel") if(CMAKE_VS_PLATFORM_TOOLSET MATCHES "DPC\\+\\+ Compiler") set(id_cl dpcpp.exe) elseif(CMAKE_VS_PLATFORM_TOOLSET MATCHES "C\\+\\+ Compiler 2021") set(id_cl icx.exe) elseif(CMAKE_VS_PLATFORM_TOOLSET MATCHES "C\\+\\+ Compiler") set(id_cl icl.exe) endif() else() set(id_cl cl.exe) endif() if(CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android") set(v NsightTegra) set(ext vcxproj) if(lang STREQUAL CXX) set(id_gcc g++) set(id_clang clang++) else() set(id_gcc gcc) set(id_clang clang) endif() elseif(lang STREQUAL Fortran) set(v Intel) set(ext vfproj) set(id_cl ifort.exe) elseif(lang STREQUAL CSharp) set(v 10) set(ext csproj) set(id_cl csc.exe) elseif(NOT "${vs_version}" VERSION_LESS 10) set(v 10) set(ext vcxproj) else() set(id_version ${vs_version}.00) set(v 7) set(ext vcproj) endif() if(CMAKE_VS_PLATFORM_TOOLSET) if(CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android") set(id_toolset "<NdkToolchainVersion>${CMAKE_VS_PLATFORM_TOOLSET}</NdkToolchainVersion>") else() set(id_toolset "<PlatformToolset>${CMAKE_VS_PLATFORM_TOOLSET}</PlatformToolset>") if(CMAKE_VS_PLATFORM_TOOLSET_VERSION) set(id_sep "\\") if(CMAKE_VS_PLATFORM_TOOLSET_VERSION VERSION_GREATER_EQUAL "14.20") if(EXISTS "${CMAKE_GENERATOR_INSTANCE}/VC/Auxiliary/Build.${CMAKE_VS_PLATFORM_TOOLSET_VERSION}/Microsoft.VCToolsVersion.${CMAKE_VS_PLATFORM_TOOLSET_VERSION}.props") set(id_sep ".") endif() endif() set(id_toolset_version_props "<Import Project=\"${CMAKE_GENERATOR_INSTANCE}\\VC\\Auxiliary\\Build${id_sep}${CMAKE_VS_PLATFORM_TOOLSET_VERSION}\\Microsoft.VCToolsVersion.${CMAKE_VS_PLATFORM_TOOLSET_VERSION}.props\" />") unset(id_sep) endif() endif() else() set(id_toolset "") set(id_toolset_version_props "") endif() if(CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE) set(id_PreferredToolArchitecture "<PreferredToolArchitecture>${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}</PreferredToolArchitecture>") else() set(id_PreferredToolArchitecture "") endif() if(CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone") set(id_keyword "Win32Proj") set(id_system "<ApplicationType>Windows Phone</ApplicationType>") elseif(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") set(id_keyword "Win32Proj") set(id_system "<ApplicationType>Windows Store</ApplicationType>") elseif(CMAKE_SYSTEM_NAME STREQUAL "Android") set(id_keyword "Android") set(id_system "<ApplicationType>Android</ApplicationType>") else() set(id_keyword "Win32Proj") set(id_system "") endif() if(id_keyword STREQUAL "Android") if(CMAKE_GENERATOR MATCHES "Visual Studio 14") set(id_system_version "<ApplicationTypeRevision>2.0</ApplicationTypeRevision>") elseif(CMAKE_GENERATOR MATCHES "Visual Studio 1[56]") set(id_system_version "<ApplicationTypeRevision>3.0</ApplicationTypeRevision>") else() set(id_system_version "") endif() elseif(id_system AND CMAKE_SYSTEM_VERSION MATCHES "^([0-9]+\\.[0-9]+)") set(id_system_version "<ApplicationTypeRevision>${CMAKE_MATCH_1}</ApplicationTypeRevision>") else() set(id_system_version "") endif() if(id_keyword STREQUAL "Android") set(id_config_type "DynamicLibrary") else() set(id_config_type "Application") endif() if(CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION) set(id_WindowsTargetPlatformVersion "<WindowsTargetPlatformVersion>${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}</WindowsTargetPlatformVersion>") endif() if(CMAKE_VS_PLATFORM_TOOLSET_VCTARGETS_CUSTOM_DIR) set(id_ToolsetVCTargetsDir "<VCTargetsPath>${CMAKE_VS_PLATFORM_TOOLSET_VCTARGETS_CUSTOM_DIR}</VCTargetsPath>") endif() if(CMAKE_VS_TARGET_FRAMEWORK_VERSION) set(id_TargetFrameworkVersion "<TargetFrameworkVersion>${CMAKE_VS_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>") endif() if(CMAKE_VS_TARGET_FRAMEWORK_IDENTIFIER) set(id_TargetFrameworkIdentifier "<TargetFrameworkIdentifier>${CMAKE_VS_TARGET_FRAMEWORK_IDENTIFIER}</TargetFrameworkIdentifier>") endif() if(CMAKE_VS_TARGET_FRAMEWORK_TARGETS_VERSION) set(id_TargetFrameworkTargetsVersion "<TargetFrameworkTargetsVersion>${CMAKE_VS_TARGET_FRAMEWORK_TARGETS_VERSION}</TargetFrameworkTargetsVersion>") endif() set(id_CustomGlobals "") foreach(pair IN LISTS CMAKE_VS_GLOBALS) if("${pair}" MATCHES "([^=]+)=(.*)$") string(APPEND id_CustomGlobals "<${CMAKE_MATCH_1}>${CMAKE_MATCH_2}</${CMAKE_MATCH_1}>\n ") endif() endforeach() if(id_keyword STREQUAL "Android") set(id_WindowsSDKDesktopARMSupport "") elseif(id_platform STREQUAL "ARM64") set(id_WindowsSDKDesktopARMSupport "<WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>") elseif(id_platform STREQUAL "ARM") set(id_WindowsSDKDesktopARMSupport "<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>") else() set(id_WindowsSDKDesktopARMSupport "") endif() if(CMAKE_VS_WINCE_VERSION) set(id_entrypoint "mainACRTStartup") if("${vs_version}" VERSION_LESS 9) set(id_subsystem 9) else() set(id_subsystem 8) endif() else() set(id_subsystem 1) endif() set(id_dir ${CMAKE_${lang}_COMPILER_ID_DIR}) set(id_src "${src}") set(id_compile "ClCompile") if(id_cl_var) set(id_PostBuildEvent_Command "echo CMAKE_${lang}_COMPILER=$(${id_cl_var})") else() set(id_PostBuildEvent_Command "for %%i in (${id_cl}) do %40echo CMAKE_${lang}_COMPILER=%%~$PATH:i") endif() set(id_Import_props "") set(id_Import_targets "") set(id_ItemDefinitionGroup_entry "") set(id_Link_AdditionalDependencies "") if(lang STREQUAL CUDA) if(NOT CMAKE_VS_PLATFORM_TOOLSET_CUDA) message(FATAL_ERROR "No CUDA toolset found.") endif() set(cuda_tools "CUDA ${CMAKE_VS_PLATFORM_TOOLSET_CUDA}") set(id_compile "CudaCompile") if(CMAKE_VS_PLATFORM_NAME STREQUAL x64) set(cuda_target "<TargetMachinePlatform>64</TargetMachinePlatform>") endif() foreach(arch ${CMAKE_CUDA_ARCHITECTURES}) string(REGEX MATCH "[0-9]+" arch_name "${arch}") string(APPEND cuda_codegen "compute_${arch_name},sm_${arch_name};") endforeach() set(id_ItemDefinitionGroup_entry "<CudaCompile>${cuda_target}<AdditionalOptions>%(AdditionalOptions)-v</AdditionalOptions><CodeGeneration>${cuda_codegen}</CodeGeneration></CudaCompile>") set(id_PostBuildEvent_Command [[echo CMAKE_CUDA_COMPILER=$(CudaToolkitBinDir)\nvcc.exe]]) if(CMAKE_VS_PLATFORM_TOOLSET_CUDA_CUSTOM_DIR) # check for legacy cuda custom toolkit folder structure if(EXISTS ${CMAKE_VS_PLATFORM_TOOLSET_CUDA_CUSTOM_DIR}nvcc) set(id_CudaToolkitCustomDir "<CudaToolkitCustomDir>${CMAKE_VS_PLATFORM_TOOLSET_CUDA_CUSTOM_DIR}nvcc</CudaToolkitCustomDir>") else() set(id_CudaToolkitCustomDir "<CudaToolkitCustomDir>${CMAKE_VS_PLATFORM_TOOLSET_CUDA_CUSTOM_DIR}</CudaToolkitCustomDir>") endif() if(EXISTS ${CMAKE_VS_PLATFORM_TOOLSET_CUDA_CUSTOM_DIR}CUDAVisualStudioIntegration) string(CONCAT id_Import_props "<Import Project=\"${CMAKE_VS_PLATFORM_TOOLSET_CUDA_CUSTOM_DIR}CUDAVisualStudioIntegration\\extras\\visual_studio_integration\\MSBuildExtensions\\${cuda_tools}.props\" />") string(CONCAT id_Import_targets "<Import Project=\"${CMAKE_VS_PLATFORM_TOOLSET_CUDA_CUSTOM_DIR}CUDAVisualStudioIntegration\\extras\\visual_studio_integration\\MSBuildExtensions\\${cuda_tools}.targets\" />") else() string(CONCAT id_Import_props "<Import Project=\"${CMAKE_VS_PLATFORM_TOOLSET_CUDA_CUSTOM_DIR}\\extras\\visual_studio_integration\\MSBuildExtensions\\${cuda_tools}.props\" />") string(CONCAT id_Import_targets "<Import Project=\"${CMAKE_VS_PLATFORM_TOOLSET_CUDA_CUSTOM_DIR}\\extras\\visual_studio_integration\\MSBuildExtensions\\${cuda_tools}.targets\" />") endif() else() string(CONCAT id_Import_props [[<Import Project="$(VCTargetsPath)\BuildCustomizations\]] "${cuda_tools}" [[.props" />]]) string(CONCAT id_Import_targets [[<Import Project="$(VCTargetsPath)\BuildCustomizations\]] "${cuda_tools}" [[.targets" />]]) endif() if(CMAKE_CUDA_FLAGS MATCHES "(^| )-cudart +shared( |$)") set(id_Link_AdditionalDependencies "<AdditionalDependencies>cudart.lib</AdditionalDependencies>") else() set(id_Link_AdditionalDependencies "<AdditionalDependencies>cudart_static.lib</AdditionalDependencies>") endif() endif() configure_file(${CMAKE_ROOT}/Modules/CompilerId/VS-${v}.${ext}.in ${id_dir}/CompilerId${lang}.${ext} @ONLY) if(CMAKE_VS_MSBUILD_COMMAND AND NOT lang STREQUAL "Fortran") set(command "${CMAKE_VS_MSBUILD_COMMAND}" "CompilerId${lang}.${ext}" "/p:Configuration=Debug" "/p:Platform=${id_platform}" "/p:VisualStudioVersion=${vs_version}.0" ) elseif(CMAKE_VS_DEVENV_COMMAND) set(command "${CMAKE_VS_DEVENV_COMMAND}" "CompilerId${lang}.${ext}" "/build" "Debug") else() set(command "") endif() if(command) execute_process( COMMAND ${command} 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() set(CMAKE_${lang}_COMPILER_ID_RESULT 1) set(CMAKE_${lang}_COMPILER_ID_OUTPUT "VS environment not known to support ${lang}") endif() # Match the compiler location line printed out. if("${CMAKE_${lang}_COMPILER_ID_OUTPUT}" MATCHES "CMAKE_${lang}_COMPILER=([^%\r\n]+)[\r\n]") # Strip VS diagnostic output from the end of the line. string(REGEX REPLACE " \\(TaskId:[0-9]*\\)$" "" _comp "${CMAKE_MATCH_1}") if(EXISTS "${_comp}") file(TO_CMAKE_PATH "${_comp}" _comp) set(CMAKE_${lang}_COMPILER_ID_TOOL "${_comp}" PARENT_SCOPE) endif() endif() elseif("${CMAKE_GENERATOR}" MATCHES "Xcode") set(id_lang "${lang}") set(id_type ${CMAKE_${lang}_COMPILER_XCODE_TYPE}) set(id_dir ${CMAKE_${lang}_COMPILER_ID_DIR}) set(id_src "${src}") if(CMAKE_XCODE_PLATFORM_TOOLSET) set(id_toolset "GCC_VERSION = ${CMAKE_XCODE_PLATFORM_TOOLSET};") else() set(id_toolset "") endif() set(id_lang_version "") if("x${lang}" STREQUAL "xSwift") if(CMAKE_Swift_LANGUAGE_VERSION) set(id_lang_version "SWIFT_VERSION = ${CMAKE_Swift_LANGUAGE_VERSION};") elseif(XCODE_VERSION VERSION_GREATER_EQUAL 10.2) set(id_lang_version "SWIFT_VERSION = 4.0;") elseif(XCODE_VERSION VERSION_GREATER_EQUAL 8.3) set(id_lang_version "SWIFT_VERSION = 3.0;") else() set(id_lang_version "SWIFT_VERSION = 2.3;") endif() elseif("x${lang}" STREQUAL "xC" OR "x${lang}" STREQUAL "xOBJC") if(CMAKE_${lang}_COMPILER_ID_FLAGS MATCHES "(^| )(-std=[^ ]+)( |$)") set(id_lang_version "OTHER_CFLAGS = \"${CMAKE_MATCH_2}\";") endif() elseif("x${lang}" STREQUAL "xCXX" OR "x${lang}" STREQUAL "xOBJCXX") if(CMAKE_${lang}_COMPILER_ID_FLAGS MATCHES "(^| )(-std=[^ ]+)( |$)") set(id_lang_version "OTHER_CPLUSPLUSFLAGS = \"${CMAKE_MATCH_2}\";") endif() endif() if(CMAKE_OSX_DEPLOYMENT_TARGET) set(id_deployment_target "MACOSX_DEPLOYMENT_TARGET = \"${CMAKE_OSX_DEPLOYMENT_TARGET}\";") else() set(id_deployment_target "") endif() set(id_product_type "com.apple.product-type.tool") if(CMAKE_OSX_SYSROOT) set(id_sdkroot "SDKROOT = \"${CMAKE_OSX_SYSROOT}\";") if(CMAKE_OSX_SYSROOT MATCHES "(^|/)[Ii][Pp][Hh][Oo][Nn][Ee]" OR CMAKE_OSX_SYSROOT MATCHES "(^|/)[Aa][Pp][Pp][Ll][Ee][Tt][Vv]") set(id_product_type "com.apple.product-type.bundle.unit-test") elseif(CMAKE_OSX_SYSROOT MATCHES "(^|/)[Ww][Aa][Tt][Cc][Hh]") set(id_product_type "com.apple.product-type.framework") endif() else() set(id_sdkroot "") endif() set(id_clang_cxx_library "") set(stdlib_regex "(^| )(-stdlib=)([^ ]+)( |$)") string(REGEX MATCHALL "${stdlib_regex}" all_stdlib_matches "${CMAKE_CXX_FLAGS}") if(all_stdlib_matches) list(GET all_stdlib_matches "-1" last_stdlib_match) if(last_stdlib_match MATCHES "${stdlib_regex}") set(id_clang_cxx_library "CLANG_CXX_LIBRARY = \"${CMAKE_MATCH_3}\";") endif() endif() if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_OSX_SYSROOT MATCHES "^$|[Mm][Aa][Cc][Oo][Ss]") # When targeting macOS, use only the host architecture. if (_CMAKE_APPLE_ARCHS_DEFAULT) set(id_archs "ARCHS = \"${_CMAKE_APPLE_ARCHS_DEFAULT}\";") set(id_arch_active "ONLY_ACTIVE_ARCH = NO;") else() set(id_archs [[ARCHS = "$(NATIVE_ARCH_ACTUAL)";]]) set(id_arch_active "ONLY_ACTIVE_ARCH = YES;") endif() else() set(id_archs "") set(id_arch_active "ONLY_ACTIVE_ARCH = YES;") endif() configure_file(${CMAKE_ROOT}/Modules/CompilerId/Xcode-3.pbxproj.in ${id_dir}/CompilerId${lang}.xcodeproj/project.pbxproj @ONLY) unset(_ENV_MACOSX_DEPLOYMENT_TARGET) if(DEFINED ENV{MACOSX_DEPLOYMENT_TARGET}) set(_ENV_MACOSX_DEPLOYMENT_TARGET "$ENV{MACOSX_DEPLOYMENT_TARGET}") set(ENV{MACOSX_DEPLOYMENT_TARGET} "") endif() execute_process(COMMAND xcodebuild 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 ) if(DEFINED _ENV_MACOSX_DEPLOYMENT_TARGET) set(ENV{MACOSX_DEPLOYMENT_TARGET} "${_ENV_MACOSX_DEPLOYMENT_TARGET}") endif() if(DEFINED CMAKE_${lang}_COMPILER_ID_TOOL_MATCH_REGEX) if("${CMAKE_${lang}_COMPILER_ID_OUTPUT}" MATCHES "${CMAKE_${lang}_COMPILER_ID_TOOL_MATCH_REGEX}") set(_comp "${CMAKE_MATCH_${CMAKE_${lang}_COMPILER_ID_TOOL_MATCH_INDEX}}") if(EXISTS "${_comp}") set(CMAKE_${lang}_COMPILER_ID_TOOL "${_comp}" PARENT_SCOPE) endif() endif() endif() if("${CMAKE_${lang}_COMPILER_ID_OUTPUT}" MATCHES "ARCHS=([^%\r\n]+)[\r\n]") set(CMAKE_${lang}_XCODE_ARCHS "${CMAKE_MATCH_1}") separate_arguments(CMAKE_${lang}_XCODE_ARCHS) set(CMAKE_${lang}_XCODE_ARCHS "${CMAKE_${lang}_XCODE_ARCHS}" PARENT_SCOPE) endif() elseif("${CMAKE_GENERATOR}" MATCHES "Green Hills MULTI") set(id_dir ${CMAKE_${lang}_COMPILER_ID_DIR}) set(id_src "${src}") if (GHS_PRIMARY_TARGET) set(ghs_primary_target "${GHS_PRIMARY_TARGET}") else() set(ghs_primary_target "${CMAKE_GENERATOR_PLATFORM}_${GHS_TARGET_PLATFORM}.tgt") endif() if ("${GHS_TARGET_PLATFORM}" MATCHES "integrity") set(bsp_name "macro GHS_BSP=${GHS_BSP_NAME}") set(os_dir "macro GHS_OS=${GHS_OS_DIR}") endif() set(command "${CMAKE_MAKE_PROGRAM}" "-commands" "-top" "GHS_default.gpj") configure_file(${CMAKE_ROOT}/Modules/CompilerId/GHS_default.gpj.in ${id_dir}/GHS_default.gpj @ONLY) configure_file(${CMAKE_ROOT}/Modules/CompilerId/GHS_lib.gpj.in ${id_dir}/GHS_lib.gpj @ONLY) execute_process(COMMAND ${command} WORKING_DIRECTORY ${id_dir} OUTPUT_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT ERROR_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT RESULT_VARIABLE CMAKE_${lang}_COMPILER_ID_RESULT ) # Match the compiler location line printed out. set(ghs_toolpath "${CMAKE_MAKE_PROGRAM}") if(CMAKE_HOST_UNIX) string(REPLACE "/gbuild" "/" ghs_toolpath ${ghs_toolpath}) else() string(REPLACE "/gbuild.exe" "/" ghs_toolpath ${ghs_toolpath}) string(REPLACE / "\\\\" ghs_toolpath ${ghs_toolpath}) endif() if("${CMAKE_${lang}_COMPILER_ID_OUTPUT}" MATCHES "(${ghs_toolpath}[^ ]*)") if(CMAKE_HOST_UNIX) set(_comp "${CMAKE_MATCH_1}") else() set(_comp "${CMAKE_MATCH_1}.exe") endif() if(EXISTS "${_comp}") file(TO_CMAKE_PATH "${_comp}" _comp) set(CMAKE_${lang}_COMPILER_ID_TOOL "${_comp}" PARENT_SCOPE) endif() endif() else() execute_process( COMMAND "${CMAKE_${lang}_COMPILER}" ${CMAKE_${lang}_COMPILER_ID_ARG1} ${userflags} ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS} "${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 ) if("${CMAKE_${lang}_COMPILER_ID_OUTPUT}" MATCHES "exec: [^\n]*\\((/[^,\n]*/cpp),CMakeFortranCompilerId.F") set(_cpp "${CMAKE_MATCH_1}") if(EXISTS "${_cpp}") set(CMAKE_${lang}_COMPILER_ID_CPP "${_cpp}" PARENT_SCOPE) endif() endif() endif() # Check the result of compilation. if(CMAKE_${lang}_COMPILER_ID_RESULT # Intel Fortran warns and ignores preprocessor lines without /fpp OR CMAKE_${lang}_COMPILER_ID_OUTPUT MATCHES "warning #5117: Bad # preprocessor line" ) # 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} ") # Log the output unless we recognize it as a known-bad case. if(NOT CMAKE_${lang}_COMPILER_ID_OUTPUT MATCHES "warning #5117: Bad # preprocessor line") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "${MSG}") endif() # Some languages may know the correct/desired set of flags and want to fail right away if they don't work. # This is currently only used by CUDA. if(__compiler_id_require_success) message(FATAL_ERROR "${MSG}") endif() # No output files should be inspected. set(COMPILER_${lang}_PRODUCED_FILES) set(COMPILER_${lang}_PRODUCED_OUTPUT) else() # 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. string(REGEX REPLACE "([][])" "[\\1]" _glob_id_dir "${CMAKE_${lang}_COMPILER_ID_DIR}") file(GLOB files RELATIVE ${CMAKE_${lang}_COMPILER_ID_DIR} # normal case ${_glob_id_dir}/* # com.apple.package-type.bundle.unit-test ${_glob_id_dir}/*.xctest/* # com.apple.product-type.framework ${_glob_id_dir}/*.framework/* ) list(REMOVE_ITEM files "${src}") set(COMPILER_${lang}_PRODUCED_FILES "") foreach(file ${files}) if(NOT IS_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR}/${file}) list(APPEND COMPILER_${lang}_PRODUCED_FILES ${file}) file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Compilation of the ${lang} compiler identification source \"" "${src}\" produced \"${file}\"\n\n") endif() endforeach() 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() set(COMPILER_${lang}_PRODUCED_OUTPUT "${CMAKE_${lang}_COMPILER_ID_OUTPUT}") endif() # Return the files produced by the compilation. set(COMPILER_${lang}_PRODUCED_FILES "${COMPILER_${lang}_PRODUCED_FILES}" PARENT_SCOPE) set(COMPILER_${lang}_PRODUCED_OUTPUT "${COMPILER_${lang}_PRODUCED_OUTPUT}" PARENT_SCOPE) endfunction() #----------------------------------------------------------------------------- # Function to extract the compiler id from compiler output. function(CMAKE_DETERMINE_COMPILER_ID_MATCH_VENDOR lang output) foreach(vendor ${CMAKE_${lang}_COMPILER_ID_MATCH_VENDORS}) if(output MATCHES "${CMAKE_${lang}_COMPILER_ID_MATCH_VENDOR_REGEX_${vendor}}") set(CMAKE_${lang}_COMPILER_ID "${vendor}") endif() endforeach() set(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE) endfunction() #----------------------------------------------------------------------------- # 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(COMPILER_VERSION) set(COMPILER_VERSION_MAJOR 0) set(COMPILER_VERSION_MINOR 0) set(COMPILER_VERSION_PATCH 0) set(COMPILER_VERSION_TWEAK 0) set(COMPILER_VERSION_INTERNAL "") set(HAVE_COMPILER_VERSION_MAJOR 0) set(HAVE_COMPILER_VERSION_MINOR 0) set(HAVE_COMPILER_VERSION_PATCH 0) set(HAVE_COMPILER_VERSION_TWEAK 0) set(COMPILER_WRAPPER) set(DIGIT_VALUE_1 1) set(DIGIT_VALUE_2 10) set(DIGIT_VALUE_3 100) set(DIGIT_VALUE_4 1000) set(DIGIT_VALUE_5 10000) set(DIGIT_VALUE_6 100000) set(DIGIT_VALUE_7 1000000) set(DIGIT_VALUE_8 10000000) set(PLATFORM_ID) set(ARCHITECTURE_ID) set(SIMULATE_ID) set(SIMULATE_VERSION) foreach(encoding "" "ENCODING;UTF-16LE" "ENCODING;UTF-16BE") file(STRINGS "${file}" CMAKE_${lang}_COMPILER_ID_STRINGS LIMIT_COUNT 38 ${encoding} REGEX ".?I.?N.?F.?O.?:.?[A-Za-z0-9_]+\\[[^]]*\\]") if(NOT CMAKE_${lang}_COMPILER_ID_STRINGS STREQUAL "") break() endif() endforeach() # With the IAR Compiler, some strings are found twice, first time as incomplete # list like "?<Constant "INFO:compiler[IAR]">". Remove the incomplete copies. list(FILTER CMAKE_${lang}_COMPILER_ID_STRINGS EXCLUDE REGEX "\\?<Constant \\\"") # The IAR-AVR compiler uses a binary format that places a '6' # character (0x34) before each character in the string. Strip # out these characters without removing any legitimate characters. if(CMAKE_${lang}_COMPILER_ID_STRINGS MATCHES "(.)I.N.F.O.:.") string(REGEX REPLACE "${CMAKE_MATCH_1}([^;])" "\\1" CMAKE_${lang}_COMPILER_ID_STRINGS "${CMAKE_${lang}_COMPILER_ID_STRINGS}") endif() # Remove arbitrary text that may appear before or after each INFO string. string(REGEX MATCHALL "INFO:[A-Za-z0-9_]+\\[([^]\"]*)\\]" CMAKE_${lang}_COMPILER_ID_STRINGS "${CMAKE_${lang}_COMPILER_ID_STRINGS}") # In C# binaries, some strings are found more than once. list(REMOVE_DUPLICATES CMAKE_${lang}_COMPILER_ID_STRINGS) set(COMPILER_ID_TWICE) foreach(info ${CMAKE_${lang}_COMPILER_ID_STRINGS}) if("${info}" MATCHES "INFO:compiler\\[([^]\"]*)\\]") if(COMPILER_ID) set(COMPILER_ID_TWICE 1) endif() set(COMPILER_ID "${CMAKE_MATCH_1}") endif() if("${info}" MATCHES "INFO:platform\\[([^]\"]*)\\]") set(PLATFORM_ID "${CMAKE_MATCH_1}") endif() if("${info}" MATCHES "INFO:arch\\[([^]\"]*)\\]") set(ARCHITECTURE_ID "${CMAKE_MATCH_1}") endif() if("${info}" MATCHES "INFO:compiler_version\\[([^]\"]*)\\]") string(REGEX REPLACE "^0+([0-9]+)" "\\1" COMPILER_VERSION "${CMAKE_MATCH_1}") string(REGEX REPLACE "\\.0+([0-9])" ".\\1" COMPILER_VERSION "${COMPILER_VERSION}") endif() if("${info}" MATCHES "INFO:compiler_version_internal\\[([^]\"]*)\\]") set(COMPILER_VERSION_INTERNAL "${CMAKE_MATCH_1}") string(REGEX REPLACE "^0+([0-9]+)" "\\1" COMPILER_VERSION_INTERNAL "${COMPILER_VERSION_INTERNAL}") string(REGEX REPLACE "\\.0+([0-9]+)" ".\\1" COMPILER_VERSION_INTERNAL "${COMPILER_VERSION_INTERNAL}") string(STRIP "${COMPILER_VERSION_INTERNAL}" COMPILER_VERSION_INTERNAL) endif() foreach(comp MAJOR MINOR PATCH TWEAK) foreach(digit 1 2 3 4 5 6 7 8 9) if("${info}" MATCHES "INFO:compiler_version_${comp}_digit_${digit}\\[([0-9])\\]") set(value ${CMAKE_MATCH_1}) math(EXPR COMPILER_VERSION_${comp} "${COMPILER_VERSION_${comp}} + ${value} * ${DIGIT_VALUE_${digit}}") set(HAVE_COMPILER_VERSION_${comp} 1) endif() endforeach() endforeach() if("${info}" MATCHES "INFO:compiler_wrapper\\[([^]\"]*)\\]") set(COMPILER_WRAPPER "${CMAKE_MATCH_1}") endif() if("${info}" MATCHES "INFO:simulate\\[([^]\"]*)\\]") set(SIMULATE_ID "${CMAKE_MATCH_1}") endif() if("${info}" MATCHES "INFO:simulate_version\\[([^]\"]*)\\]") string(REGEX REPLACE "^0+([0-9])" "\\1" SIMULATE_VERSION "${CMAKE_MATCH_1}") string(REGEX REPLACE "\\.0+([0-9])" ".\\1" SIMULATE_VERSION "${SIMULATE_VERSION}") endif() if("${info}" MATCHES "INFO:qnxnto\\[\\]") set(COMPILER_QNXNTO 1) endif() if("${info}" MATCHES "INFO:standard_default\\[([^]\"]*)\\]") set(CMAKE_${lang}_STANDARD_COMPUTED_DEFAULT "${CMAKE_MATCH_1}") endif() if("${info}" MATCHES "INFO:extensions_default\\[([^]\"]*)\\]") set(CMAKE_${lang}_EXTENSIONS_COMPUTED_DEFAULT "${CMAKE_MATCH_1}") endif() endforeach() # Construct compiler version from components if needed. if(NOT DEFINED COMPILER_VERSION AND HAVE_COMPILER_VERSION_MAJOR) set(COMPILER_VERSION "${COMPILER_VERSION_MAJOR}") if(HAVE_COMPILER_VERSION_MINOR) string(APPEND COMPILER_VERSION ".${COMPILER_VERSION_MINOR}") if(HAVE_COMPILER_VERSION_PATCH) string(APPEND COMPILER_VERSION ".${COMPILER_VERSION_PATCH}") if(HAVE_COMPILER_VERSION_TWEAK) string(APPEND COMPILER_VERSION ".${COMPILER_VERSION_TWEAK}") endif() endif() endif() endif() # Detect the exact architecture from the PE header. if(WIN32) # The offset to the PE signature is stored at 0x3c. file(READ ${file} peoffsethex LIMIT 1 OFFSET 60 HEX) if(NOT peoffsethex STREQUAL "") string(SUBSTRING "${peoffsethex}" 0 1 peoffsethex1) string(SUBSTRING "${peoffsethex}" 1 1 peoffsethex2) set(peoffsetexpression "${peoffsethex1} * 16 + ${peoffsethex2}") string(REPLACE "a" "10" peoffsetexpression "${peoffsetexpression}") string(REPLACE "b" "11" peoffsetexpression "${peoffsetexpression}") string(REPLACE "c" "12" peoffsetexpression "${peoffsetexpression}") string(REPLACE "d" "13" peoffsetexpression "${peoffsetexpression}") string(REPLACE "e" "14" peoffsetexpression "${peoffsetexpression}") string(REPLACE "f" "15" peoffsetexpression "${peoffsetexpression}") math(EXPR peoffset "${peoffsetexpression}") file(READ ${file} peheader LIMIT 6 OFFSET ${peoffset} HEX) if(peheader STREQUAL "50450000a201") set(ARCHITECTURE_ID "SH3") elseif(peheader STREQUAL "50450000a301") set(ARCHITECTURE_ID "SH3DSP") elseif(peheader STREQUAL "50450000a601") set(ARCHITECTURE_ID "SH4") elseif(peheader STREQUAL "50450000a801") set(ARCHITECTURE_ID "SH5") endif() endif() endif() # 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}") set(CMAKE_${lang}_COMPILER_ARCHITECTURE_ID "${ARCHITECTURE_ID}") set(MSVC_${lang}_ARCHITECTURE_ID "${ARCHITECTURE_ID}") set(CMAKE_${lang}_COMPILER_VERSION "${COMPILER_VERSION}") set(CMAKE_${lang}_COMPILER_VERSION_INTERNAL "${COMPILER_VERSION_INTERNAL}") set(CMAKE_${lang}_SIMULATE_ID "${SIMULATE_ID}") set(CMAKE_${lang}_SIMULATE_VERSION "${SIMULATE_VERSION}") endif() # 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() # 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() endif() # 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() # # COFF (.exe) files start with "MZ" # if("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "4d5a....") # set(CMAKE_EXECUTABLE_FORMAT "COFF" CACHE INTERNAL "Executable file format") # endif() # # Mach-O files start with MH_MAGIC or MH_CIGAM if("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "feedface|cefaedfe|feedfacf|cffaedfe") set(CMAKE_EXECUTABLE_FORMAT "MACHO" CACHE INTERNAL "Executable file format") endif() # XCOFF files start with 0x01 followed by 0xDF (32-bit) or 0xF7 (64-bit). if("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "^01(df|f7)") set(CMAKE_EXECUTABLE_FORMAT "XCOFF" CACHE INTERNAL "Executable file format") endif() endif() # 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_${lang}_COMPILER_ARCHITECTURE_ID "${CMAKE_${lang}_COMPILER_ARCHITECTURE_ID}" PARENT_SCOPE) set(MSVC_${lang}_ARCHITECTURE_ID "${MSVC_${lang}_ARCHITECTURE_ID}" PARENT_SCOPE) set(CMAKE_${lang}_COMPILER_VERSION "${CMAKE_${lang}_COMPILER_VERSION}" PARENT_SCOPE) set(CMAKE_${lang}_COMPILER_VERSION_INTERNAL "${CMAKE_${lang}_COMPILER_VERSION_INTERNAL}" PARENT_SCOPE) set(CMAKE_${lang}_COMPILER_WRAPPER "${COMPILER_WRAPPER}" PARENT_SCOPE) set(CMAKE_${lang}_SIMULATE_ID "${CMAKE_${lang}_SIMULATE_ID}" PARENT_SCOPE) set(CMAKE_${lang}_SIMULATE_VERSION "${CMAKE_${lang}_SIMULATE_VERSION}" PARENT_SCOPE) set(COMPILER_QNXNTO "${COMPILER_QNXNTO}" PARENT_SCOPE) set(CMAKE_${lang}_STANDARD_COMPUTED_DEFAULT "${CMAKE_${lang}_STANDARD_COMPUTED_DEFAULT}" PARENT_SCOPE) set(CMAKE_${lang}_EXTENSIONS_COMPUTED_DEFAULT "${CMAKE_${lang}_EXTENSIONS_COMPUTED_DEFAULT}" PARENT_SCOPE) endfunction() #----------------------------------------------------------------------------- # Function to query the compiler vendor. # This uses a table with entries of the form # list(APPEND CMAKE_${lang}_COMPILER_ID_VENDORS ${vendor}) # set(CMAKE_${lang}_COMPILER_ID_VENDOR_FLAGS_${vendor} -some-vendor-flag) # set(CMAKE_${lang}_COMPILER_ID_VENDOR_REGEX_${vendor} "Some Vendor Output") # We try running the compiler with the flag for each vendor and # matching its regular expression in the output. function(CMAKE_DETERMINE_COMPILER_ID_VENDOR lang userflags) if(NOT CMAKE_${lang}_COMPILER_ID_DIR) # We get here when this function is called not from within CMAKE_DETERMINE_COMPILER_ID() # This is done e.g. for detecting the compiler ID for assemblers. # Compute the directory in which to run the test and Create a clean working directory. set(CMAKE_${lang}_COMPILER_ID_DIR ${CMAKE_PLATFORM_INFO_DIR}/CompilerId${lang}) file(REMOVE_RECURSE ${CMAKE_${lang}_COMPILER_ID_DIR}) file(MAKE_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR}) endif() # Save the current LC_ALL, LC_MESSAGES, and LANG environment variables # and set them to "C" so we get the expected output to match. set(_orig_lc_all $ENV{LC_ALL}) set(_orig_lc_messages $ENV{LC_MESSAGES}) set(_orig_lang $ENV{LANG}) set(ENV{LC_ALL} C) set(ENV{LC_MESSAGES} C) set(ENV{LANG} C) foreach(vendor ${CMAKE_${lang}_COMPILER_ID_VENDORS}) set(flags ${CMAKE_${lang}_COMPILER_ID_VENDOR_FLAGS_${vendor}}) set(regex ${CMAKE_${lang}_COMPILER_ID_VENDOR_REGEX_${vendor}}) execute_process( COMMAND "${CMAKE_${lang}_COMPILER}" ${CMAKE_${lang}_COMPILER_ID_ARG1} ${userflags} ${flags} WORKING_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR} OUTPUT_VARIABLE output ERROR_VARIABLE output RESULT_VARIABLE result TIMEOUT 10 ) if("${output}" MATCHES "${regex}") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Checking whether the ${lang} compiler is ${vendor} using \"${flags}\" " "matched \"${regex}\":\n${output}") set(CMAKE_${lang}_COMPILER_ID "${vendor}" PARENT_SCOPE) set(CMAKE_${lang}_COMPILER_ID_OUTPUT "${output}" PARENT_SCOPE) set(CMAKE_${lang}_COMPILER_ID_VENDOR_MATCH "${CMAKE_MATCH_1}" PARENT_SCOPE) break() else() if("${result}" MATCHES "timeout") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Checking whether the ${lang} compiler is ${vendor} using \"${flags}\" " "terminated after 10 s due to timeout.") else() file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Checking whether the ${lang} compiler is ${vendor} using \"${flags}\" " "did not match \"${regex}\":\n${output}") endif() endif() endforeach() # Restore original LC_ALL, LC_MESSAGES, and LANG set(ENV{LC_ALL} ${_orig_lc_all}) set(ENV{LC_MESSAGES} ${_orig_lc_messages}) set(ENV{LANG} ${_orig_lang}) endfunction() function(CMAKE_DETERMINE_MSVC_SHOWINCLUDES_PREFIX lang userflags) # Run this MSVC-compatible compiler to detect what the /showIncludes # option displays. We can use a C source even with the C++ compiler # because MSVC-compatible compilers handle both and show the same output. set(showdir ${CMAKE_BINARY_DIR}/CMakeFiles/ShowIncludes) file(WRITE ${showdir}/foo.h "\n") file(WRITE ${showdir}/main.c "#include \"foo.h\" \nint main(){}\n") execute_process( COMMAND "${CMAKE_${lang}_COMPILER}" ${CMAKE_${lang}_COMPILER_ID_ARG1} ${userflags} /nologo /showIncludes /c main.c WORKING_DIRECTORY ${showdir} OUTPUT_VARIABLE out ERROR_VARIABLE err RESULT_VARIABLE res ENCODING AUTO # cl prints in current code page ) if(res EQUAL 0 AND "${out}" MATCHES "(^|\n)([^:\n]*:[^:\n]*:[ \t]*)") set(CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX "${CMAKE_MATCH_2}" PARENT_SCOPE) else() set(CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX "" PARENT_SCOPE) endif() endfunction()
Close