public final class Platform extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Platform.Architecture
The architecture of an operating system.
|
static class |
Platform.OperatingSystem
Operating systems.
|
| Modifier and Type | Field and Description |
|---|---|
Platform.Architecture |
architecture
The architecture of the platform.
|
Platform.OperatingSystem |
operatingSystem
The operating system of the platform.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRunTests() |
static Platform |
detected()
Returns the detected platform.
|
String |
getClassifier()
Returns the classifier associated with this platform.
|
String |
getDownloadSuffix()
Returns the suffix to append to the cmake download filename.
|
String |
getEnvironment(ProcessBuilder processBuilder,
String name)
Returns the value of a
ProcessBuilder's environment variable. |
Path |
getExecutableOnPath(String filename,
String path)
Returns the fully qualified path of the executable.
|
String |
getExecutableSuffix()
Returns the suffix to append to the cmake executables.
|
boolean |
isDownloadAvailable() |
void |
overrideEnvironmentVariables(Map<String,String> source,
ProcessBuilder target)
Overrides the environment variables of a process builder.
|
boolean |
shipsWithPlatform() |
boolean |
supportsPosix(InputStream in)
Indicates if the operating system supports POSIX attributes.
|
String |
toString() |
public final Platform.OperatingSystem operatingSystem
public final Platform.Architecture architecture
public static Platform detected()
public boolean shipsWithPlatform()
true if cmake binaries ship with the platformpublic boolean isDownloadAvailable()
true if the platform binaries are available on
CMake's websitepublic boolean canRunTests()
true if automated tests can run on this platformpublic String getClassifier()
UnsupportedOperationException - if CMake's website
does not provide binaries for this platformpublic Path getExecutableOnPath(String filename, String path) throws FileNotFoundException
filename - the filename of a binarypath - the PATH environment variableNullPointerException - if any of the arguments are nullFileNotFoundException - if the binary could not be foundpublic String getExecutableSuffix()
UnsupportedOperationException - if CMake's website
does not provide binaries for this platformpublic String getDownloadSuffix()
UnsupportedOperationException - if CMake's website
does not provide binaries for this platformpublic boolean supportsPosix(InputStream in)
in - the InputStream associated with the archiveUnsupportedOperationException - if CMake's website
does not provide binaries for this platformpublic String getEnvironment(ProcessBuilder processBuilder, String name)
ProcessBuilder's environment variable.processBuilder - a ProcessBuildername - an environment variablepublic void overrideEnvironmentVariables(Map<String,String> source, ProcessBuilder target)
source - new environment variablestarget - existing environment variablesNullPointerException - if any of the arguments are nullCopyright © 2024. All rights reserved.