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

Method GetCBTargetType

Source/cmExtraCodeBlocksGenerator.cxx:697–716  ·  view source on GitHub ↗

Translate the cmake target type into the CodeBlocks target type id

Source from the content-addressed store, hash-verified

695
696// Translate the cmake target type into the CodeBlocks target type id
697int cmExtraCodeBlocksGenerator::GetCBTargetType(cmGeneratorTarget* target)
698{
699 switch (target->GetType()) {
700 case cmStateEnums::EXECUTABLE:
701 if ((target->IsWin32Executable(
702 target->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"))) ||
703 (target->GetPropertyAsBool("MACOSX_BUNDLE"))) {
704 return 0;
705 }
706 return 1;
707 case cmStateEnums::STATIC_LIBRARY:
708 case cmStateEnums::OBJECT_LIBRARY:
709 return 2;
710 case cmStateEnums::SHARED_LIBRARY:
711 case cmStateEnums::MODULE_LIBRARY:
712 return 3;
713 default:
714 return 4;
715 }
716}
717
718// Create the command line for building the given target using the selected
719// make

Callers 1

AppendTargetMethod · 0.95

Calls 3

IsWin32ExecutableMethod · 0.80
GetTypeMethod · 0.45
GetPropertyAsBoolMethod · 0.45

Tested by

no test coverage detected