MCPcopy Create free account
hub / github.com/Kitware/CMake / CanCompileSources

Method CanCompileSources

Source/cmTarget.cxx:2892–2914  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2890}
2891
2892bool cmTarget::CanCompileSources() const
2893{
2894 if (this->IsImported()) {
2895 return false;
2896 }
2897 if (this->IsSynthetic()) {
2898 return true;
2899 }
2900 switch (this->GetType()) {
2901 case cmStateEnums::EXECUTABLE:
2902 case cmStateEnums::STATIC_LIBRARY:
2903 case cmStateEnums::SHARED_LIBRARY:
2904 case cmStateEnums::MODULE_LIBRARY:
2905 case cmStateEnums::OBJECT_LIBRARY:
2906 return true;
2907 case cmStateEnums::UTILITY:
2908 case cmStateEnums::INTERFACE_LIBRARY:
2909 case cmStateEnums::GLOBAL_TARGET:
2910 case cmStateEnums::UNKNOWN_LIBRARY:
2911 break;
2912 }
2913 return false;
2914}
2915
2916void cmTarget::SetIsForTryCompile()
2917{

Callers 9

cmTargetMethod · 0.95
CreateBuildSettingsMethod · 0.45
AddAutomaticSourcesMethod · 0.45
GetLocalObjectFilesMethod · 0.45
ComputeMethod · 0.45
AppendTargetDependsMethod · 0.45

Calls 3

IsSyntheticMethod · 0.95
GetTypeMethod · 0.95
IsImportedMethod · 0.45

Tested by

no test coverage detected