1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-04-07 19:26:46 +00:00

reset unsigned commits

Signed-off-by: joebre <joel.brenner@saphyrion.ch>
This commit is contained in:
joebre 2025-01-15 10:29:48 +01:00
parent 14e1d94c91
commit 530a56b159
No known key found for this signature in database
GPG Key ID: BC6DFC8DA2EB8871
2735 changed files with 415346 additions and 263997 deletions

289
.clang-format Normal file
View File

@ -0,0 +1,289 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2018-2024 Carles Fernandez-Prades <carles.fernandez@cttc.es>
---
Language: Cpp
# BasedOnStyle: Google
# More info: https://clang.llvm.org/docs/ClangFormatStyleOptions.html
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
AlignArrayOfStructures: None
AlignConsecutiveAssignments:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: true
AlignConsecutiveBitFields:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: false
AlignConsecutiveDeclarations:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: true
AlignConsecutiveMacros:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: false
AlignConsecutiveShortCaseStatements:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCaseArrows: false
AlignCaseColons: false
AlignConsecutiveTableGenBreakingDAGArgColons:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: false
AlignConsecutiveTableGenCondOperatorColons:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: false
AlignConsecutiveTableGenDefinitionColons:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: false
AlignEscapedNewlines: Left
AlignOperands: Align
AlignTrailingComments:
Kind: Always
OverEmptyLines: 0
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowBreakBeforeNoexceptSpecifier: Never
AllowShortBlocksOnASingleLine: Never
AllowShortCaseExpressionOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: false
AllowShortCompoundRequirementOnASingleLine: true
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AttributeMacros:
- __capability
BinPackArguments: true
BinPackParameters: true
BitFieldColonSpacing: Both
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Always
AfterEnum: true
AfterExternBlock: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: false
BeforeWhile: true
IndentBraces: true
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakAdjacentStringLiterals: true
BreakAfterAttributes: Leave
BreakAfterJavaFieldAnnotations: false
BreakAfterReturnType: None
BreakArrays: true
BreakBeforeBinaryOperators: None
BreakBeforeConceptDeclarations: Always
BreakBeforeBraces: GNU
BreakBeforeInlineASMColon: OnlyMultiline
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
BreakFunctionDefinitionParameters: false
BreakInheritanceList: BeforeColon
BreakStringLiterals: true
BreakTemplateDeclarations: MultiLine
ColumnLimit: 0
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: true
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IfMacros:
- KJ_IF_MAYBE
IncludeBlocks: Merge
IncludeCategories:
- Regex: '^.*.h"'
Priority: 1
SortPriority: 0
CaseSensitive: false
- Regex: '^.*(benchmark|boost|gflags|glog|gnsssdr|gnuradio|gnsstk|gsl|gtest|pmt|uhd|volk)/'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '^.*(armadillo|iio|matio|pugixml)'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '.*'
Priority: 3
SortPriority: 0
CaseSensitive: false
- Regex: '^<.*\.h>'
Priority: 4
SortPriority: 0
CaseSensitive: false
- Regex: '^<.*'
Priority: 5
SortPriority: 0
CaseSensitive: false
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
IndentAccessModifiers: false
IndentCaseBlocks: false
IndentCaseLabels: false
IndentExternBlock: AfterExternBlock
IndentGotoLabels: true
IndentPPDirectives: None
IndentRequiresClause: true
IndentWidth: 4
IndentWrappedFunctionNames: false
InsertBraces: false
InsertNewlineAtEOF: false
InsertTrailingCommas: None
IntegerLiteralSeparator:
Binary: 0
BinaryMinDigits: 0
Decimal: 0
DecimalMinDigits: 0
Hex: 0
HexMinDigits: 0
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLines:
AtEndOfFile: false
AtStartOfBlock: false
AtStartOfFile: true
LambdaBodyIndentation: Signature
LineEnding: DeriveLF
MacroBlockBegin: ''
MacroBlockEnd: ''
MainIncludeChar: Quote
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: false
PackConstructorInitializers: NextLine
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakOpenParenthesis: 0
PenaltyBreakScopeResolution: 500
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyIndentedWhitespace: 0
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
PPIndentWidth: -1
QualifierAlignment: Leave
ReferenceAlignment: Pointer
ReflowComments: true
RemoveBracesLLVM: false
RemoveParentheses: Leave
RemoveSemicolon: false
RequiresClausePosition: OwnLine
RequiresExpressionIndentation: OuterScope
SeparateDefinitionBlocks: Leave
ShortNamespaceLines: 1
SkipMacroDefinitionBody: false
SortIncludes: CaseSensitive
SortJavaStaticImport: Before
SortUsingDeclarations: LexicographicNumeric
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeJsonColon: false
SpaceBeforeParens: ControlStatements
SpaceBeforeParensOptions:
AfterControlStatements: true
AfterForeachMacros: true
AfterFunctionDefinitionName: false
AfterFunctionDeclarationName: false
AfterIfMacros: true
AfterOverloadedOperator: false
AfterPlacementOperator: true
AfterRequiresInClause: false
AfterRequiresInExpression: false
BeforeNonEmptyParentheses: false
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: Never
SpacesInContainerLiterals: true
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInParens: Never
SpacesInParensOptions:
ExceptDoubleParentheses: false
InCStyleCasts: false
InConditionalStatements: false
InEmptyParentheses: false
Other: false
SpacesInSquareBrackets: false
Standard: Auto
StatementAttributeLikeMacros:
- Q_EMIT
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TableGenBreakInsideDAGArg: DontBreak
TabWidth: 8
UseTab: Never
VerilogBreakBetweenInstancePorts: true
WhitespaceSensitiveMacros:
- BOOST_PP_STRINGIZE
- CF_SWIFT_NAME
- NS_SWIFT_NAME
- PP_STRINGIZE
- STRINGIZE
...

441
.clang-tidy Normal file
View File

@ -0,0 +1,441 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2018-2020 Carles Fernandez-Prades <carles.fernandez@cttc.es>
---
Checks: '-*,
boost-use-to-string,
bugprone-argument-comment,
bugprone-assert-side-effect,
bugprone-bool-pointer-implicit-conversion,
bugprone-copy-constructor-init,
bugprone-dangling-handle,
bugprone-exception-escape,
bugprone-fold-init-type,
bugprone-forward-declaration-namespace,
bugprone-forwarding-reference-overload,
bugprone-inaccurate-erase,
bugprone-incorrect-roundings,
bugprone-integer-division,
bugprone-lambda-function-name,
bugprone-macro-parentheses,
bugprone-macro-repeated-side-effects,
bugprone-misplaced-operator-in-strlen-in-alloc,
bugprone-misplaced-widening-cast,
bugprone-move-forwarding-reference,
bugprone-multiple-statement-macro,
bugprone-parent-virtual-call,
bugprone-redundant-branch-condition,
bugprone-reserved-identifier,
bugprone-sizeof-container,
bugprone-sizeof-expression,
bugprone-string-constructor,
bugprone-string-integer-assignment,
bugprone-string-literal-with-embedded-nul,
bugprone-suspicious-enum-usage,
bugprone-suspicious-memset-usage,
bugprone-suspicious-missing-comma,
bugprone-suspicious-semicolon,
bugprone-suspicious-string-compare,
bugprone-swapped-arguments,
bugprone-terminating-continue,
bugprone-throw-keyword-missing,
bugprone-too-small-loop-variable,
bugprone-undefined-memory-manipulation,
bugprone-undelegated-constructor,
bugprone-unused-raii,
bugprone-unused-return-value,
bugprone-use-after-move,
bugprone-virtual-near-miss,
cert-dcl21-cpp,
cert-dcl58-cpp,
cert-env33-c,
cert-err52-cpp,
cert-err60-cpp,
cert-flp30-c,
cert-msc50-cpp,
cert-msc51-cpp,
clang-analyzer-cplusplus.*,
clang-analyzer-optin.performance.*,
clang-analyzer-optin.portability.UnixAPI,
clang-analyzer-security.*,
cppcoreguidelines-prefer-member-initializer,
cppcoreguidelines-pro-type-cstyle-cast,
cppcoreguidelines-pro-type-static-cast-downcast,
cppcoreguidelines-slicing,
cppcoreguidelines-special-member-functions,
google-build-namespaces,
google-global-names-in-headers,
google-runtime-int,
hicpp-exception-baseclass,
hicpp-explicit-conversions,
hicpp-noexcept-move,
misc-misplaced-const,
misc-new-delete-overloads,
misc-non-copyable-objects,
misc-redundant-expression,
misc-static-assert,
misc-throw-by-value-catch-by-reference,
misc-uniqueptr-reset-release,
misc-unused-using-decls,
modernize-avoid-bind,
modernize-use-default-member-init,
modernize-deprecated-headers,
modernize-loop-convert,
modernize-raw-string-literal,
modernize-redundant-void-arg,
modernize-return-braced-init-list,
modernize-shrink-to-fit,
modernize-use-auto,
modernize-use-bool-literals,
modernize-use-emplace,
modernize-use-equals-default,
modernize-use-equals-delete,
modernize-use-noexcept,
modernize-use-nullptr,
modernize-use-override,
performance-faster-string-find,
performance-for-range-copy,
performance-implicit-conversion-in-loop,
performance-inefficient-algorithm,
performance-inefficient-string-concatenation,
performance-inefficient-vector-operation,
performance-move-const-arg,
performance-move-constructor-init,
performance-noexcept-move-constructor,
performance-type-promotion-in-math-fn,
performance-unnecessary-copy-initialization,
performance-unnecessary-value-param,
readability-avoid-const-params-in-decls,
readability-braces-around-statements,
readability-container-size-empty,
readability-identifier-naming,
readability-inconsistent-declaration-parameter-name,
readability-isolate-declaration,
readability-make-member-function-const,
readability-named-parameter,
readability-non-const-parameter,
readability-qualified-auto,
readability-redundant-control-flow,
readability-redundant-member-init,
readability-string-compare,
readability-uppercase-literal-suffix'
WarningsAsErrors: ''
HeaderFilterRegex: ''
FormatStyle: 'file'
CheckOptions:
- key: performance-unnecessary-copy-initialization.ExcludedContainerTypes
value: ''
- key: modernize-replace-auto-ptr.IncludeStyle
value: llvm
- key: performance-move-const-arg.CheckTriviallyCopyableMove
value: 'true'
- key: modernize-use-auto.MinTypeNameLength
value: '5'
- key: bugprone-reserved-identifier.Invert
value: 'false'
- key: bugprone-unused-return-value.CheckedFunctions
value: 'std::async;
std::launder;
std::remove;
std::remove_if;
std::unique;
std::unique_ptr::release;
std::basic_string::empty;
std::vector::empty;
std::back_inserter;
std::distance;
std::find;
std::find_if;
std::inserter;
std::lower_bound;
std::make_pair;
std::map::count;
std::map::find;
std::map::lower_bound;
std::multimap::equal_range;
std::multimap::upper_bound;
std::set::count;
std::set::find;
std::setfill;
std::setprecision;
std::setw;
std::upper_bound;
std::vector::at;
::bsearch;
::ferror;
::feof;
::isalnum;
::isalpha;
::isblank;
::iscntrl;
::isdigit;
::isgraph;
::islower;
::isprint;
::ispunct;
::isspace;
::isupper;
::iswalnum;
::iswprint;
::iswspace;
::isxdigit;
::memchr;
::memcmp;
::strcmp;
::strcoll;
::strncmp;
::strpbrk;
::strrchr;
::strspn;
::strstr;
::wcscmp;
::access;
::bind;
::connect;
::difftime;
::dlsym;
::fnmatch;
::getaddrinfo;
::getopt;
::htonl;
::htons;
::iconv_open;
::inet_addr;
::isascii;
::isatty;
::mmap;
::newlocale;
::openat;
::pathconf;
::pthread_equal;
::pthread_getspecific;
::pthread_mutex_trylock;
::readdir;
::readlink;
::recvmsg;
::regexec;
::scandir;
::semget;
::setjmp;
::shm_open;
::shmget;
::sigismember;
::strcasecmp;
::strsignal;
::ttyname'
- key: cert-dcl16-c.NewSuffixes
value: 'L;LL;LU;LLU'
- key: readability-identifier-naming.GetConfigPerFile
value: 'true'
- key: readability-inconsistent-declaration-parameter-name.Strict
value: 'false'
- key: modernize-use-default-member-init.UseAssignment
value: 'false'
- key: modernize-use-override.AllowOverrideAndFinal
value: 'false'
- key: modernize-loop-convert.IncludeStyle
value: llvm
- key: cert-str34-c.DiagnoseSignedUnsignedCharComparisons
value: 'false'
- key: misc-uniqueptr-reset-release.IncludeStyle
value: llvm
- key: bugprone-suspicious-string-compare.WarnOnLogicalNotComparison
value: 'false'
- key: readability-identifier-naming.AggressiveDependentMemberLookup
value: 'false'
- key: bugprone-suspicious-string-compare.WarnOnImplicitComparison
value: 'true'
- key: modernize-use-emplace.TupleTypes
value: 'std::pair;std::tuple'
- key: modernize-use-emplace.TupleMakeFunctions
value: 'std::make_pair;std::make_tuple'
- key: bugprone-argument-comment.CommentNullPtrs
value: '0'
- key: bugprone-argument-comment.StrictMode
value: '0'
- key: modernize-loop-convert.MakeReverseRangeHeader
value: ''
- key: modernize-use-bool-literals.IgnoreMacros
value: 'true'
- key: google-readability-namespace-comments.ShortNamespaceLines
value: '10'
- key: bugprone-suspicious-string-compare.StringCompareLikeFunctions
value: ''
- key: modernize-avoid-bind.PermissiveParameterList
value: 'false'
- key: modernize-use-override.FinalSpelling
value: final
- key: modernize-loop-convert.UseCxx20ReverseRanges
value: 'true'
- key: modernize-use-noexcept.ReplacementString
value: ''
- key: cppcoreguidelines-prefer-member-initializer.UseAssignment
value: 'false'
- key: performance-type-promotion-in-math-fn.IncludeStyle
value: llvm
- key: modernize-loop-convert.NamingStyle
value: CamelCase
- key: bugprone-suspicious-missing-comma.SizeThreshold
value: '5'
- key: readability-inconsistent-declaration-parameter-name.IgnoreMacros
value: 'true'
- key: performance-for-range-copy.WarnOnAllAutoCopies
value: 'false'
- key: bugprone-argument-comment.CommentIntegerLiterals
value: '0'
- key: google-runtime-int.UnsignedTypePrefix
value: uint
- key: modernize-loop-convert.MakeReverseRangeFunction
value: ''
- key: readability-identifier-naming.IgnoreFailedSplit
value: 'false'
- key: modernize-pass-by-value.IncludeStyle
value: llvm
- key: readability-qualified-auto.AddConstToQualified
value: 'true'
- key: bugprone-sizeof-expression.WarnOnSizeOfThis
value: 'true'
- key: bugprone-string-constructor.WarnOnLargeLength
value: 'true'
- key: bugprone-argument-comment.CommentCharacterLiterals
value: '0'
- key: bugprone-too-small-loop-variable.MagnitudeBitsUpperLimit
value: '16'
- key: bugprone-argument-comment.CommentFloatLiterals
value: '0'
- key: google-global-names-in-headers.HeaderFileExtensions
value: ';h;hh;hpp;hxx'
- key: readability-uppercase-literal-suffix.IgnoreMacros
value: 'true'
- key: modernize-use-nullptr.NullMacros
value: 'NULL'
- key: bugprone-suspicious-enum-usage.StrictMode
value: 'false'
- key: performance-unnecessary-copy-initialization.AllowedTypes
value: ''
- key: bugprone-suspicious-missing-comma.MaxConcatenatedTokens
value: '5'
- key: misc-throw-by-value-catch-by-reference.CheckThrowTemporaries
value: 'true'
- key: bugprone-string-constructor.LargeLengthThreshold
value: '8388608'
- key: cppcoreguidelines-special-member-functions.AllowMissingMoveFunctions
value: 'false'
- key: cert-oop54-cpp.WarnOnlyIfThisHasSuspiciousField
value: 'false'
- key: bugprone-exception-escape.FunctionsThatShouldNotThrow
value: ''
- key: performance-inefficient-vector-operation.EnableProto
value: 'false'
- key: bugprone-argument-comment.CommentStringLiterals
value: '0'
- key: modernize-loop-convert.MaxCopySize
value: '16'
- key: google-build-namespaces.HeaderFileExtensions
value: ';h;hh;hpp;hxx'
- key: cppcoreguidelines-explicit-virtual-functions.IgnoreDestructors
value: 'true'
- key: performance-for-range-copy.AllowedTypes
value: ''
- key: modernize-use-override.IgnoreDestructors
value: 'false'
- key: bugprone-sizeof-expression.WarnOnSizeOfConstant
value: 'true'
- key: modernize-use-emplace.ContainersWithPushBack
value: 'std::vector;std::list;std::deque'
- key: bugprone-argument-comment.CommentBoolLiterals
value: '0'
- key: readability-braces-around-statements.ShortStatementLines
value: '0'
- key: bugprone-argument-comment.CommentUserDefinedLiterals
value: '0'
- key: modernize-use-override.OverrideSpelling
value: override
- key: performance-inefficient-string-concatenation.StrictMode
value: 'false'
- key: google-readability-braces-around-statements.ShortStatementLines
value: '1'
- key: google-runtime-int.TypeSuffix
value: _t
- key: bugprone-reserved-identifier.AllowedIdentifiers
value: '_pb;_pbi'
- key: modernize-use-emplace.IgnoreImplicitConstructors
value: 'false'
- key: modernize-use-equals-delete.IgnoreMacros
value: 'true'
- key: bugprone-misplaced-widening-cast.CheckImplicitCasts
value: 'false'
- key: readability-uppercase-literal-suffix.NewSuffixes
value: ''
- key: modernize-loop-convert.MinConfidence
value: reasonable
- key: performance-unnecessary-value-param.AllowedTypes
value: ''
- key: bugprone-suspicious-missing-comma.RatioThreshold
value: '0.200000'
- key: cppcoreguidelines-special-member-functions.AllowMissingMoveFunctionsWhenCopyIsDeleted
value: 'false'
- key: modernize-use-noexcept.UseNoexceptFalse
value: 'true'
- key: google-readability-namespace-comments.SpacesBeforeComments
value: '2'
- key: misc-throw-by-value-catch-by-reference.MaxSize
value: '64'
- key: cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
value: 'true'
- key: bugprone-argument-comment.IgnoreSingleArgument
value: '0'
- key: bugprone-sizeof-expression.WarnOnSizeOfIntegerExpression
value: 'false'
- key: performance-faster-string-find.StringLikeClasses
value: 'std::basic_string;std::basic_string_view'
- key: bugprone-assert-side-effect.CheckFunctionCalls
value: 'false'
- key: bugprone-string-constructor.StringNames
value: '::std::basic_string;::std::basic_string_view'
- key: bugprone-assert-side-effect.AssertMacros
value: assert
- key: bugprone-exception-escape.IgnoredExceptions
value: ''
- key: modernize-use-default-member-init.IgnoreMacros
value: 'true'
- key: llvm-qualified-auto.AddConstToQualified
value: 'false'
- key: readability-identifier-naming.IgnoreMainLikeFunctions
value: 'false'
- key: google-runtime-int.SignedTypePrefix
value: int
- key: google-readability-function-size.StatementThreshold
value: '800'
- key: llvm-else-after-return.WarnOnConditionVariables
value: 'false'
- key: cert-msc51-cpp.DisallowedSeedTypes
value: 'time_t,std::time_t'
- key: bugprone-sizeof-expression.WarnOnSizeOfCompareToConstant
value: 'true'
- key: bugprone-reserved-identifier.AggressiveDependentMemberLookup
value: 'false'
- key: modernize-raw-string-literal.DelimiterStem
value: lit
- key: modernize-use-equals-default.IgnoreMacros
value: 'true'
- key: misc-throw-by-value-catch-by-reference.WarnOnLargeObjects
value: 'false'
- key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor
value: 'false'
- key: modernize-raw-string-literal.ReplaceShorterLiterals
value: 'false'
- key: modernize-use-emplace.SmartPointers
value: 'std::shared_ptr;std::unique_ptr;std::auto_ptr;std::weak_ptr'
- key: performance-inefficient-vector-operation.VectorLikeClasses
value: 'std::vector'
- key: modernize-use-auto.RemoveStars
value: 'false'
- key: bugprone-dangling-handle.HandleClasses
value: 'std::basic_string_view;std::experimental::basic_string_view'
- key: performance-unnecessary-value-param.IncludeStyle
value: llvm
- key: readability-redundant-member-init.IgnoreBaseInCopyConstructors
value: 'false'
- key: llvm-else-after-return.WarnOnUnfixable
value: 'false'
...

41
.github/DCO.txt vendored Normal file
View File

@ -0,0 +1,41 @@
Developer Certificate of Origin
Version 1.1
SPDX-License-Identifier: GPL-3.0-or-later
Copyright (C) 2021 Centre Tecnològic de Telecomunicacions de Catalunya (CTTC)
and its contributors.
Parc Mediterrani de la Tecnologia (PMT)
Building B4
Av. Carl Friedrich Gauss 7
08860 - Castelldefels (Spain)
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.

54
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,54 @@
:+1::tada: Hello, and thanks for contributing to
[GNSS-SDR](https://gnss-sdr.org)! :tada::+1:
<!-- prettier-ignore-start -->
[comment]: # (
SPDX-License-Identifier: GPL-3.0-or-later
)
[comment]: # (
SPDX-FileCopyrightText: 2011-2021 Carles Fernandez-Prades <carles.fernandez@cttc.es>
)
<!-- prettier-ignore-end -->
Any code contributions going into GNSS-SDR will become part of a GPL-licensed,
open source repository. It is therefore imperative that code submissions belong
to the authors, and that submitters have the authority to merge that code into
the public GNSS-SDR codebase.
For that purpose, we use the
[Developer's Certificate of Origin](https://github.com/gnss-sdr/gnss-sdr/blob/next/.github/DCO.txt).
It is the same document used by other projects. Signing the DCO states that
there are no legal reasons to not merge your code.
To sign the DCO, suffix your git commits with a `Signed-off-by:` line. When
using the command line, you can use `git commit -s` to automatically add this
line. If there were multiple authors of the code, or other types of
stakeholders, make sure that all are listed, each with a separate
`Signed-off-by:` line.
Before submitting your pull request, please make sure the following is done:
1. You undertake the
[Contributor Covenant Code of Conduct](https://github.com/gnss-sdr/gnss-sdr/blob/main/CODE_OF_CONDUCT.md).
2. You have read the
[Developer's Certificate of Origin](https://github.com/gnss-sdr/gnss-sdr/blob/next/.github/DCO.txt)
and
[signed your commits](https://gnss-sdr.org/docs/tutorials/using-git/#sign-your-commits)
as an indication of fulfillment.
3. You have read the
[Contributing Guidelines](https://github.com/gnss-sdr/gnss-sdr/blob/main/CONTRIBUTING.md).
4. You have read the [coding style guide](https://gnss-sdr.org/coding-style/).
Specifically, you have read
[about clang-format](https://gnss-sdr.org/coding-style/#use-tools-for-automated-code-formatting)
and [about clang-tidy](https://gnss-sdr.org/coding-style/#use-code-linters),
and you have applied those tools to your changes.
5. You have forked the
[gnss-sdr upstream repository](https://github.com/gnss-sdr/gnss-sdr) and
have created your branch from `next` (or any other currently living branch
in the upstream repository).
6. Please include a description of your changes here.
**Please feel free to delete this line and the above text once you have read it
and in case you want to go on with your pull request, and explain your intend
below.**

31
.github/workflows/citation.yml vendored Normal file
View File

@ -0,0 +1,31 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2022 Carles Fernandez-Prades <carles.fernandez@cttc.es>
on:
push:
paths:
- CITATION.cff
pull_request:
paths:
- CITATION.cff
workflow_dispatch:
name: CITATION.cff
jobs:
Validate-CITATION-cff:
runs-on: ubuntu-latest
name: Validate CITATION.cff
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate CITATION.cff
uses: dieghernan/cff-validator@main
# Upload artifact in case of failure
- name: Update artifact
uses: actions/upload-artifact@v4
if: failure()
with:
name: citation-cff-errors
path: citation_cff_errors.md

79
.github/workflows/gnss-sdr_archs.yml vendored Normal file
View File

@ -0,0 +1,79 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2023 Carles Fernandez-Prades <carles.fernandez@cttc.es>
name: Run gnss-sdr in non-x86 archs
on:
push:
branches:
- "**-archs"
- main
workflow_dispatch:
jobs:
gnss-sdr-non-x86:
runs-on: ubuntu-latest
name: ${{ matrix.distro }} ${{ matrix.arch }} ${{ matrix.compiler.name }}
# Run steps on a matrix of archs.
strategy:
fail-fast: false
matrix:
include:
- arch: aarch64
distro: ubuntu22.04
compiler: { name: g++-12, cc: gcc-12, cxx: g++-12 }
- arch: aarch64
distro: ubuntu22.04
compiler: { name: clang-14, cc: clang-14, cxx: clang++-14 }
- arch: armv7
distro: ubuntu22.04
compiler: { name: g++-12, cc: gcc-12, cxx: g++-12 }
- arch: riscv64
distro: ubuntu22.04
compiler: { name: g++-12, cc: gcc-12, cxx: g++-12 }
# - arch: ppc64le
# distro: ubuntu22.04
# compiler: { name: g++-12, cc: gcc-12, cxx: g++-12 }
# - arch: s390x
# distro: ubuntu22.04
# compiler: { name: g++-12, cc: gcc-12, cxx: g++-12 }
steps:
- uses: actions/checkout@v4
- uses: uraimo/run-on-arch-action@v2.7.1
name: Test in non-x86 container
continue-on-error: ${{ contains(fromJson('["ppc64le", "s390x"]'), matrix.arch) }}
id: test
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}
githubToken: ${{ github.token }} # Not required, but speeds up builds
setup: |
mkdir -p "${PWD}/testing"
dockerRunArgs: |
--volume "${PWD}:/gnss-sdr"
env: |
CC: ${{ matrix.compiler.cc }}
CXX: ${{ matrix.compiler.cxx }}
shell: /bin/sh
install: |
apt-get update -q -y
apt-get install -q -y ${{ matrix.compiler.name }} git ninja-build cmake \
libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev \
libboost-thread-dev libboost-chrono-dev libboost-serialization-dev \
liblog4cpp5-dev gnuradio-dev gr-osmosdr libpugixml-dev libpcap-dev libblas-dev \
liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev \
libgnutls-openssl-dev libmatio-dev googletest protobuf-compiler libprotobuf-dev \
python3-mako liborc-0.4-dev
run: |
git config --global --add safe.directory /gnss-sdr
cd /gnss-sdr
cd testing
mkdir install
cmake -DENABLE_SYSTEM_TESTING_EXTRA=ON -DCMAKE_INSTALL_PREFIX=/gnss-sdr/testing/install -DENABLE_INSTALL_TESTS=ON ..
echo "Build with $(nproc) thread(s)"
make -j$(nproc)
make install
cd install/bin
./position_test

301
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,301 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2020-2024 Carles Fernandez-Prades <carles.fernandez@cttc.es>
name: Simple CI
on:
pull_request:
paths-ignore:
- "**/CITATION.cff"
push:
paths-ignore:
- "**/CITATION.cff"
workflow_dispatch:
jobs:
build-ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: |
sudo apt-get update -y
sudo apt install -y libunwind-dev
sudo apt-get install -y --no-install-recommends ninja-build cmake \
libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev \
libboost-thread-dev libboost-chrono-dev libboost-serialization-dev \
liblog4cpp5-dev gnuradio-dev gr-osmosdr libpugixml-dev libpcap-dev libblas-dev \
liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev \
libgnutls-openssl-dev libmatio-dev googletest protobuf-compiler libprotobuf-dev \
python3-mako liborc-0.4-dev
- name: configure
run: cmake -S . -B build -GNinja
- name: build
run: cmake --build build
- name: check
run: cmake --build build --target check && ./install/volk_gnsssdr_profile && ./install/run_tests
- name: default position_test
run: |
cmake -S . -B build -DENABLE_SYSTEM_TESTING_EXTRA=ON -DENABLE_UNIT_TESTING_EXTRA=OFF && \
cmake --build build && ./install/position_test && ./install/run_tests --gtest_filter=Osnma*
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: install dependencies
run: |
brew update
rm /usr/local/bin/2to3 || true
rm /usr/local/bin/idle3 || true
rm /usr/local/bin/pydoc3 || true
rm /usr/local/bin/python3 || true
rm /usr/local/bin/python3-config || true
rm /usr/local/bin/2to3-3.1* || true
rm /usr/local/bin/idle3.1* || true
rm /usr/local/bin/pydoc3.1* || true
rm /usr/local/bin/python3.1* || true
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
brew link --overwrite python@3.12
brew install ninja hdf5 automake armadillo lapack libmatio gnuradio openssl pugixml protobuf boost
pip3 install mako
- name: configure
run: cmake -S . -B build -GNinja
- name: build
run: cmake --build build
- name: check
run: cmake --build build --target check && ./install/volk_gnsssdr_profile && ./install/run_tests
- name: default position_test
run: |
cmake -S . -B build -DENABLE_SYSTEM_TESTING_EXTRA=ON -DENABLE_UNIT_TESTING_EXTRA=OFF && \
cmake --build build && ./install/position_test && ./install/run_tests --gtest_filter=Osnma*
build-macos-xcode:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: install dependencies
run: |
brew update
rm /usr/local/bin/2to3 || true
rm /usr/local/bin/idle3 || true
rm /usr/local/bin/pydoc3 || true
rm /usr/local/bin/python3 || true
rm /usr/local/bin/python3-config || true
rm /usr/local/bin/2to3-3.1* || true
rm /usr/local/bin/idle3.1* || true
rm /usr/local/bin/pydoc3.1* || true
rm /usr/local/bin/python3.1* || true
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
brew link --overwrite python@3.12
brew install ninja pkg-config hdf5 automake armadillo lapack libmatio gnuradio openssl pugixml protobuf boost
pip3 install mako
- name: configure
run: cmake -S . -B build -GXcode
- name: build
run: cmake --build build --config Release
- name: check
run: |
cmake --build build --config Release --target check
./install/volk_gnsssdr_profile
./install/run_tests
- name: default position_test
run: |
cmake -S . -B build -DENABLE_SYSTEM_TESTING_EXTRA=ON -DENABLE_UNIT_TESTING_EXTRA=OFF
cmake --build build --config Release --target position_test
./install/position_test
./install/run_tests --gtest_filter=Osnma*
clang-format:
runs-on: ubuntu-latest
strategy:
matrix:
path:
- 'src'
- 'tests'
- 'utils'
steps:
- uses: actions/checkout@v4
- name: run clang-format
uses: jidicula/clang-format-action@v4.14.0
with:
clang-format-version: "19"
check-path: ${{ matrix.path }}
exclude-regex: '(libs\/gsl\/)|(tmpl)|(cpu_features)|^.*\.(cu|proto)$'
clang-tidy:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: install dependencies
run: |
brew update
rm /usr/local/bin/2to3 || true
rm /usr/local/bin/idle3 || true
rm /usr/local/bin/pydoc3 || true
rm /usr/local/bin/python3 || true
rm /usr/local/bin/python3-config || true
rm /usr/local/bin/2to3-3.1* || true
rm /usr/local/bin/idle3.1* || true
rm /usr/local/bin/pydoc3.1* || true
rm /usr/local/bin/python3.1* || true
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
brew link --overwrite python@3.12
brew install ninja pkg-config hdf5 automake armadillo lapack libmatio gnuradio openssl pugixml protobuf llvm boost
pip3 install mako
ln -s $(brew --prefix llvm)/bin/clang-tidy /usr/local/bin
ln -s $(brew --prefix llvm)/bin/clang-apply-replacements /usr/local/bin
ln -s $(brew --prefix llvm)/bin/run-clang-tidy.py /usr/local/bin
- name: Prepare run
run: cmake -S . -B build && cmake --build build --target volk_gnsssdr_module gtest-1.15.2 core_monitor core_libs pvt_libs
- name: run clang-tidy
run: cd build && /opt/homebrew/opt/llvm/bin/run-clang-tidy -fix
- name: check
run: |
git diff > clang_tidy.patch
echo -e "if \n [ -s clang_tidy.patch ] \nthen \n echo "clang_tidy not applied:"; echo ""; more clang_tidy.patch; exit 1 \nfi \n" > detect
chmod +x ./detect
./detect
cpplint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: sudo apt-get install python3-pip && sudo pip3 install cpplint
- name: run checks
run: "find ./src/ ./utils ./tests -iname *.h -o -iname *.cc | xargs cpplint
--filter=-,+build/class,+build/deprecated,+build/explicit_make_pair,\
+build/forward_decl,+build/printf_format,+build/storage_class,\
+readability/constructors,+readability/namespace,+readability/newline,\
+readability/utf8,+runtime/casting,+runtime/explicit,\
+runtime/indentation_namespace,+runtime/init,+runtime/invalid_increment,\
+runtime/member_string_references,+runtime/memset,+runtime/operator,\
+runtime/printf,+runtime/printf_format,+whitespace/blank_line,\
+whitespace/comma,+whitespace/comments,+whitespace/empty_conditional_body,\
+whitespace/end-of-line,+whitespace/ending-newline,+whitespace/semicolon,\
+whitespace/tab --exclude=./src/core/interfaces/gnss_block_interface.h
--exclude=./src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cpu_features/test/hwcaps_for_testing.*
--exclude=./utils/nav-listener/build/nav_message.pb.h"
prettier-markdown:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: sudo npm install --global prettier
- name: check markdown
run: find . -iname "*.md" | xargs prettier --parser markdown --print-width 80 --prose-wrap always --list-different
cmakelint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: |
sudo pip install cmakelint
- name: check CMake scripts
run: find . -iname "CMakeLists.txt" -o -iname "*.cmake" | xargs cmakelint --filter=-linelength,-readability/wonkycase
volk-gnsssdr-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mako
- name: configure
shell: powershell
run: cmake -S src\algorithms\libs\volk_gnsssdr_module\volk_gnsssdr -B build -G "Visual Studio 17 2022"
- name: build
run: cmake --build build --config Release
- name: test
shell: powershell
run: ctest -C Release --test-dir build
- name: install
run: cmake --install build
- name: run profile
run: cd 'C:\Program Files (x86)\volk_gnsssdr\bin'; .\volk_gnsssdr_profile.exe
volk-gnsssdr-ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: sudo apt install python3-mako liborc-dev
- name: configure
run: cmake -S src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr -B build
- name: build
run: cmake --build build
- name: install
run: sudo cmake --install build && sudo ldconfig
- name: test
run: volk_gnsssdr_profile
volk-gnsssdr-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mako
- name: configure
run: cmake -S src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr -B build
- name: build
run: cmake --build build && sudo cmake --install build
- name: test
run: ctest -C Release --test-dir build --exclude-regex volk_gnsssdr_32fc_32f_rotator_dotprodxnpuppet_32fc
volk-gnsssdr-macos-xcode:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mako
- name: configure
run: cmake -S src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr -B build -GXcode
- name: build
run: cmake --build build --config Release
- name: install
run: sudo cmake --install build
- name: test
run: ctest -C Release --test-dir build --exclude-regex --exclude-regex volk_gnsssdr_32fc_32f_rotator_dotprodxnpuppet_32fc
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: sudo apt install shellcheck
- name: check scripts
run: shellcheck utils/scripts/*
REUSE-compliance:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check REUSE compliance
uses: docker://fsfe/reuse
with:
args: lint

View File

@ -0,0 +1,63 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2022 Carles Fernandez-Prades <carles.fernandez@cttc.es>
on:
push:
paths:
- "src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/**"
- "CMakeLists.txt"
pull_request:
paths:
- "src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/**"
- "CMakeLists.txt"
workflow_dispatch:
name: Build volk_gnsssdr on Android NDK
jobs:
build:
name: Build on Android NDK ${{ matrix.arch.name }}
strategy:
fail-fast: false
matrix:
arch:
- { name: armeabi-v7a, allow_fail: false }
- { name: arm64-v8a, allow_fail: false }
- { name: x86, allow_fail: false }
- { name: x86_64, allow_fail: false }
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update repositories
run: sudo apt update
- name: Install dependencies
run: sudo apt install -y cmake openjdk-11-jre-headless wget unzip make python3-mako
# Setup Android SDK, and auto-accept licenses
- name: Install Android SDK
run: |
wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip
mkdir android-sdk-linux
unzip -qq android-sdk.zip -d android-sdk-linux
export ANDROID_HOME=./android-sdk-linux
echo y | $ANDROID_HOME/cmdline-tools/bin/sdkmanager --sdk_root=android-sdk-linux --update
(echo y; echo y; echo y; echo y; echo y; echo y; echo y; echo y) | $ANDROID_HOME/cmdline-tools/bin/sdkmanager --sdk_root=android-sdk-linux --licenses
# Call SDKManager to install the Android NDK
- name: Install Android NDK
run: $GITHUB_WORKSPACE/android-sdk-linux/cmdline-tools/bin/sdkmanager --sdk_root=$GITHUB_WORKSPACE/android-sdk-linux --install "ndk;24.0.8215888" --channel=3
# Setup build directory
- name: Setup ${{ matrix.arch.name }}
shell: bash
run: |
cd $GITHUB_WORKSPACE/
mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/android-sdk-linux/ndk/24.0.8215888/build/cmake/android.toolchain.cmake \
-DANDROID_ABI=${{ matrix.arch.name }} \
-DANDROID_PLATFORM=android-24 \
../src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr
# Build
- name: Build ${{ matrix.arch.name }}
shell: bash
run: cd $GITHUB_WORKSPACE/build && make
continue-on-error: ${{ matrix.arch.allow_fail }}

View File

@ -0,0 +1,79 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2023 Carles Fernandez-Prades <carles.fernandez@cttc.es>
name: Run volk_gnsssdr tests
on:
push:
paths:
- "src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/**"
- "CMakeLists.txt"
pull_request:
paths:
- "src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/**"
- "CMakeLists.txt"
workflow_dispatch:
jobs:
build-ubuntu-non-x86:
runs-on: ubuntu-latest
name: ${{ matrix.distro }} ${{ matrix.arch }} ${{ matrix.compiler.name }}
# Run steps on a matrix of archs.
strategy:
fail-fast: false
matrix:
include:
- arch: aarch64
distro: ubuntu22.04
compiler: { name: g++-12, cc: gcc-12, cxx: g++-12 }
- arch: aarch64
distro: ubuntu22.04
compiler: { name: clang-14, cc: clang-14, cxx: clang++-14 }
- arch: armv7
distro: ubuntu22.04
compiler: { name: g++-12, cc: gcc-12, cxx: g++-12 }
- arch: ppc64le
distro: ubuntu22.04
compiler: { name: g++-12, cc: gcc-12, cxx: g++-12 }
- arch: s390x
distro: ubuntu22.04
compiler: { name: g++-12, cc: gcc-12, cxx: g++-12 }
- arch: riscv64
distro: ubuntu22.04
compiler: { name: g++-12, cc: gcc-12, cxx: g++-12 }
steps:
- uses: actions/checkout@v4
- uses: uraimo/run-on-arch-action@v2
name: Build in non-x86 container
# continue-on-error: ${{ contains(fromJson('["ppc64le", "s390x"]'), matrix.arch) }}
id: build
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}
githubToken: ${{ github.token }} # Not required, but speeds up builds
setup: |
mkdir -p "${PWD}/testing"
dockerRunArgs: |
--volume "${PWD}:/volk_gnsssdr"
env: |
CC: ${{ matrix.compiler.cc }}
CXX: ${{ matrix.compiler.cxx }}
shell: /bin/sh
install: |
apt-get update -q -y
apt-get install -q -y git cmake python3-mako liborc-dev ${{ matrix.compiler.name }}
run: |
git config --global --add safe.directory /volk_gnsssdr
cd /volk_gnsssdr
cd testing
cmake ../src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/
echo "Build with $(nproc) thread(s)"
make -j$(nproc)
./apps/volk_gnsssdr-config-info --alignment
./apps/volk_gnsssdr-config-info --avail-machines
./apps/volk_gnsssdr-config-info --all-machines
./apps/volk_gnsssdr-config-info --malloc
./apps/volk_gnsssdr-config-info --cc
ctest -V

37
.gitignore vendored
View File

@ -1,11 +1,30 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2011-2024 Carles Fernandez-Prades <carles.fernandez(at)cttc.es>
*~
docs/doxygen/Doxyfile
docs/html
docs/latex
docs/GNSS-SDR_manual.pdf
src/tests/data/output.dat
thirdparty/
.project
.cproject
.*.swp
/build/
/build*/
/cmake-build-debug/
/data/
/docs/doxygen/Doxyfile
/docs/html/
/docs/latex/
/docs/GNSS-SDR_manual.pdf
/gnss_sdr_pvt.nmea
/GSDR*
/HAS_*
/PVT_*
/Testing/
/tests/data/output.dat
/thirdparty/
/utils/nav-listener/build/
/utils/nav-listener/build*/
/install
/.DS_Store
.cproject
.DS_Store
.idea
.project
.pydevproject
.settings
.vs/
.vscode/

132
AUTHORS
View File

@ -1,56 +1,76 @@
GNSS-SDR Authorship
------------------------------------------------------------------------------
The GNSS-SDR project is hosted and sponsored by the Centre Tecnologic de
Telecomunicacions de Catalunya (CTTC), a non-profit research foundation located
in Castelldefels (40.396764 N, 3.713379 E), 20 km south of Barcelona, Spain.
GNSS-SDR is the by-product of GNSS research conducted at the Communications
Systems Division of CTTC, and it is the combined effort of students,
software engineers and researchers from different institutions around the World.
Contact Information
------------------------------------------------------------------------------
GNSS-SDR Homepage
----------------------------
http://gnss-sdr.org
CTTC Homepage
----------------------------
http://www.cttc.cat
Mailing Lists
----------------------------
gnss-sdr-developers@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/gnss-sdr-developers
Email
----------------------------
Inquiries beyond the mailing list can be sent to carles.fernandez@cttc.cat
List of authors
------------------------------------------------------------------------------
Carles Fernandez-Prades carles.fernandez@cttc.cat Project manager
Javier Arribas javier.arribas@cttc.cat Developer
Luis Esteve Elfau luis@epsilon-formacion.com Developer
Pau Closas pau.closas@cttc.cat Consultant
Carlos Aviles carlos.avilesr@googlemail.com Developer
David Pubill david.pubill@cttc.cat Developer
Mara Branzanti mara.branzanti@gmail.com Developer
Marc Molina marc.molina.pena@gmail.com Developer
Daniel Fehr daniel.co@bluewin.ch Developer
Marc Sales marcsales92@gmail.com Developer
Damian Miralles dmiralles2009@gmail.com Developer
Andres Cecilia Luque a.cecilia.luque@gmail.com Developer
Leonardo Tonetto tonetto.dev@gmail.com Contributor
Anthony Arnold anthony.arnold@uqconnect.edu.au Contributor
Fran Fabra fabra@ice.csic.es Contributor
Ignacio Paniego ignacio.paniego@gmail.com Web design
Eva Puchol eva.puchol@gmail.com Web developer
Carlos Paniego carpanie@hotmail.com Artwork
GNSS-SDR Authorship
--------------------------------------------------------------------------------
The GNSS-SDR project is hosted and sponsored by the Centre Tecnològic de
Telecomunicacions de Catalunya (CTTC), a non-profit research foundation located
in Castelldefels (41.27504 N, 1.987709 E), 20 km south of Barcelona, Spain.
GNSS-SDR is the by-product of GNSS research conducted from the Navigation &
Positioning Research Unit at CTTC, and it is the combined effort of students,
aficionados, and researchers from different institutions around the World.
Contact Information
--------------------------------------------------------------------------------
GNSS-SDR Homepage
----------------------------
https://gnss-sdr.org
CTTC Homepage
----------------------------
https://www.cttc.cat
Mailing List
----------------------------
gnss-sdr-developers@lists.sourceforge.net
https://sourceforge.net/projects/gnss-sdr/lists/gnss-sdr-developers
Email
----------------------------
Inquiries beyond the mailing list can be sent to carles.fernandez@cttc.cat
List of authors
--------------------------------------------------------------------------------
Carles Fernández-Prades carles.fernandez@cttc.cat Project manager
Javier Arribas javier.arribas@cttc.es Developer
Luis Esteve Elfau luis@epsilon-formacion.com Developer
Marc Majoral marc.majoral@cttc.cat Developer
Xavier Guerrero xavier.guerrero@cttc.es Developer
Jordi Vilà-Valls jordi.vila-valls@isae-supaero.fr Consultant
Pau Closas pau.closas@northeastern.edu Consultant
Álvaro Cebrián Juan acebrianjuan@gmail.com Contributor
Andres Cecilia Luque a.cecilia.luque@gmail.com Contributor
Anthony Arnold anthony.arnold@uqconnect.edu.au Contributor
Antonio Ramos antonio.ramosdet@gmail.com Contributor
Carlos Avilés carlos.avilesr@googlemail.com Contributor
Cesare Ghionoiu Martinez c.ghionoiu-martinez@tu-braunschweig.de Contributor
Cillian O'Driscoll cillian.odriscoll@gmail.com Contributor
Damian Miralles dmiralles2009@gmail.com Contributor
Daniel Fehr daniel.co@bluewin.ch Contributor
David Pubill david.pubill@cttc.cat Contributor
En Shin seanstone5923@gmail.com Contributor
Fran Fabra fabra@ice.csic.es Contributor
Gabriel Araujo gabriel.araujo.5000@gmail.com Contributor
Gerald LaMountain gerald@gece.neu.edu Contributor
Into Pääkkönen into.paakkonen@aalto.fi Contributor
Irene Pérez Riega iperrie@inta.es Contributor
Jim Melton jim.melton@sncorp.com Contributor
Josh Schindehette jschindehette@geontech.com Contributor
Leonardo Tonetto tonetto.dev@gmail.com Contributor
Malte Lenhart malte.lenhart@mailbox.org Contributor
Mara Branzanti mara.branzanti@gmail.com Contributor
Marc Molina marc.molina.pena@gmail.com Contributor
Marc Sales marcsales92@gmail.com Contributor
Piyush Gupta piyush04111999@gmail.com Contributor
Rodrigo Muñoz rodrigo.munoz@proteinlab.cl Contributor
Stefan van der Linden spvdlinden@gmail.com Contributor
Víctor Castillo-Agüero victorcastilloaguero@gmail.com Contributor
Will Silberman wsilberm@google.com Contributor
Carlos Paniego carpanie@hotmail.com Artwork
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2011-2024 Carles Fernandez-Prades <carles.fernandez@cttc.es>

345
CITATION.cff Normal file
View File

@ -0,0 +1,345 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2024 C. Fernandez-Prades carles.fernandez(at)cttc.es
---
authors:
- affiliation: "Centre Tecnològic de Telecomunicacions de Catalunya (CTTC)"
alias: carlesfernandez
email: carles.fernandez@cttc.es
family-names: "Fernández-Prades"
given-names: Carles
orcid: "https://orcid.org/0000-0002-9201-7007"
- affiliation: "Centre Tecnològic de Telecomunicacions de Catalunya (CTTC)"
alias: Arribas
email: javier.arribas@cttc.es
family-names: Arribas
given-names: Javier
orcid: "https://orcid.org/0000-0001-6346-3406"
- affiliation: "Centre Tecnològic de Telecomunicacions de Catalunya (CTTC)"
alias: mmajoral
email: marc.majoral@cttc.es
family-names: Majoral
given-names: Marc
orcid: "https://orcid.org/0000-0001-6161-6747"
- affiliation: "Centre Tecnològic de Telecomunicacions de Catalunya (CTTC)"
alias: xguerreropau
email: xavier.guerrero@cttc.es
family-names: Guerrero
given-names: Xavier
- alias: Gastd
email: gabriel.araujo.5000@gmail.com
family-names: Araujo
given-names: Gabriel
- email: anthony.arnold@uqconnect.edu.au
family-names: Arnold
given-names: Anthony
- email: carlos.avilesr@googlemail.com
family-names: Avilés
given-names: Carlos
- alias: marabra
email: mara.branzanti@gmail.com
family-names: Branzanti
given-names: Mara
- alias: castle055
affiliation: "Instituto Nacional de Técnica Aeroespacial"
email: victorcastilloaguero@gmail.com
family-names: "Castillo-Agüero"
given-names: Víctor
- alias: acebrianjuan
email: acebrianjuan@gmail.com
family-names: "Cebrián-Juan"
given-names: Álvaro
- email: a.cecilia.luque@gmail.com
family-names: "Cecilia-Luque"
given-names: Andrés
- alias: luis-esteve
email: luis@epsilon-formacion.com
family-names: Esteve
given-names: Luis
- email: fabra@ice.csic.es
family-names: Fabra
given-names: Fran
- email: daniel.co@bluewin.ch
family-names: Fehr
given-names: Daniel
- alias: cesaaargm
affiliation: "Technische Universität Braunschweig"
email: c.ghionoiu-martinez@tu-braunschweig.de
family-names: "Ghionoiu Martinez"
given-names: Cesare
- alias: piyush0411
email: piyush04111999@gmail.com
family-names: Gupta
given-names: Piyush
- alias: glamountain
email: gerald@gece.neu.edu
family-names: LaMountain
given-names: Gerald
- alias: lenhart
email: malte.lenhart@mailbox.org
family-names: Lenhart
given-names: Malte
- alias: jwmelto
email: jim.melton@sncorp.com
family-names: Melton
given-names: Jim
- alias: dmiralles2009
email: dmiralles2009@gmail.com
family-names: Miralles
given-names: Damian
orcid: "https://orcid.org/0000-0001-5820-9569"
- email: marc.molina.pena@gmail.com
family-names: Molina
given-names: Marc
- email: rodrigo.munoz@proteinlab.cl
family-names: Muñoz
given-names: Rodrigo
- alias: odrisci
email: cillian.odriscoll@gmail.com
family-names: "O'Driscoll"
given-names: Cillian
- affiliation: "Finnish Geospatial Research Institute"
alias: IntoPa
email: into.paakkonen@aalto.fi
family-names: "Pääkkönen"
given-names: Into
- alias: Perrielornitorrinco
affiliation: "Instituto Nacional de Técnica Aeroespacial"
email: iperrie@inta.es
given-names: Irene
family-names: "Pérez Riega"
- affiliation: "Centre Tecnològic de Telecomunicacions de Catalunya (CTTC)"
email: david.pubill@cttc.cat
family-names: Pubill
given-names: David
- alias: antonioramosdet
family-names: Ramos
given-names: Antonio
- alias: seanstone
email: seanstone5923@gmail.com
family-names: Shin
given-names: En
- alias: jschindehette
email: jschindehette@geontech.com
family-names: Schindehette
given-names: Josh
- alias: orlando017
email: wsilberm@google.com
family-names: Silberman
given-names: Will
- email: tonetto.dev@gmail.com
family-names: Tonetto
given-names: Leonardo
- alias: stefanlinden
email: spvdlinden@gmail.com
family-names: "van der Linden"
given-names: Stefan
cff-version: "1.2.0"
date-released: "2024-01-23"
identifiers:
- description: "The concept DOI of the work. This is a DOI always pointing to the latest stable release."
type: doi
value: 10.5281/zenodo.591700
keywords:
- "Global Navigation Satellite System"
- GNSS
- "software radio"
- SDR
- GPS
- Galileo
- C++
license: GPL-3.0-or-later
message: "If you use this software, please cite it using the metadata from this file."
references:
- authors:
- family-names: "Fernández-Prades"
given-names: Carles
- family-names: "Vilà-Valls"
given-names: Jordi
- family-names: Arribas
given-names: Javier
- family-names: Ramos
given-names: Antonio
doi: 10.1109/ACCESS.2018.2822835
issue: 1
journal: "IEEE Access"
pages: 13
start: 20451
end: 20463
scope: "Discussion on reproducibility in GNSS signal processing."
title: "Continuous Reproducibility in GNSS Signal Processing."
type: article
volume: 6
year: 2018
- authors:
- family-names: "Fernández-Prades"
given-names: Carles
- family-names: "Lo Presti"
given-names: Letizia
- family-names: Falleti
given-names: Emanuela
doi: 10.1109/JPROC.2011.2158032
issue: 11
journal: "Proceedigs of the IEEE"
month: 11
pages: 23
start: 1882
end: 1904
scope: "General overview on GNSS receiver technology."
title: "Satellite Radiolocalization From GPS to GNSS and Beyond: Novel Technologies and Applications for Civil Mass Market."
type: article
volume: 99
year: 2011
- authors:
- family-names: "Fernández-Prades"
given-names: Carles
- family-names: Arribas
given-names: Javier
- family-names: Majoral
given-names: Marc
- family-names: Ramos
given-names: Antonio
- family-names: "Vilà-Valls"
given-names: Jordi
- family-names: Giordano
given-names: Pietro
conference:
name: "Proc. 9th ESA Workshop on Satellite Navigation Technologies and European Workshop on GNSS Signals and Signal Processing (NAVITEC)"
doi: 10.1109/NAVITEC.2018.8642697
location:
name: "ESA/ESTEC, Noordwijk, Netherlands."
month: 12
pages: 9
scope: "Space applications of the software-defined GNSS embeded receiver."
title: "A Software-Defined Spaceborne GNSS Receiver."
type: conference-paper
year: 2018
- authors:
- family-names: "Fernández-Prades"
given-names: Carles
- family-names: Pomar
given-names: Christian
- family-names: Arribas
given-names: Javier
- family-names: Fàbrega
given-names: "Josep Maria"
- family-names: "Vilà-Valls"
given-names: Jordi
- family-names: "Svaluto Moreolo"
given-names: Michela
- family-names: Casellas
given-names: Ramon
- family-names: Martínez
given-names: Ricardo
- family-names: Navarro
given-names: Mònica
- family-names: Vílchez
given-names: "Francisco Javier"
- family-names: Muñoz
given-names: Raul
- family-names: Vilalta
given-names: Ricard
- family-names: Nadal
given-names: Laia
- family-names: Mayoral
given-names: Arturo
conference:
name: "Proc. 30th Int. Tech. Meeting Sat. Div. Inst. Navig."
doi: 10.33012/2017.15234
location:
name: "Portland, OR."
month: 9
scope: "Introduction of the virtualized GNSS receiver."
pages: 20
start: 3796
end: 3815
title: "A Cloud Optical Access Network for Virtualized GNSS Receivers"
type: conference-paper
year: 2017
- authors:
- family-names: "Fernández-Prades"
given-names: Carles
- family-names: Arribas
given-names: Javier
- family-names: Closas
given-names: Pau
conference:
name: "Proc. 8th ESA Workshop on Satellite Navigation Technologies and European Workshop on GNSS Signals and Signal Processing (NAVITEC)"
doi: 10.1109/NAVITEC.2016.7931740
location:
name: "ESA/ESTEC, Noordwijk, Netherlands."
month: 12
pages: 9
scope: "Discussion on testing methodologies for software-defined GNSS receivers."
title: "Assessment of Software-Defined GNSS Receivers"
type: conference-paper
year: 2016
- authors:
- family-names: "Fernández-Prades"
given-names: Carles
- family-names: Arribas
given-names: Javier
- family-names: Closas
given-names: Pau
conference:
name: "Proc. 29th Int. Tech. Meeting Sat. Div. Inst. Navig."
doi: 10.33012/2016.14576
location:
name: "Portland, OR."
month: 9
pages: 18
start: 44
end: 61
scope: "Analysis of software strategies for accelerating signal processing."
title: "Accelerating GNSS Software Receivers"
type: conference-paper
year: 2016
- authors:
- family-names: "Fernández-Prades"
given-names: Carles
- family-names: Arribas
given-names: Javier
- family-names: Closas
given-names: Pau
- family-names: Avilés
given-names: Carlos
- family-names: Esteve
given-names: Luis
conference:
name: "Proc. 24th Int. Tech. Meeting Sat. Div. Inst. Navig."
location:
name: "Portland, OR."
month: 9
pages: 15
start: 780
end: 794
scope: "General description of the software architecture."
title: "GNSS-SDR: An Open Source Tool For Researchers and Developers"
type: conference-paper
year: 2011
- authors:
- family-names: "Fernández-Prades"
given-names: Carles
- family-names: Avilés
given-names: Carlos
- family-names: Esteve
given-names: Luis
- family-names: Arribas
given-names: Javier
- family-names: Closas
given-names: Pau
conference:
name: "Proc. 5th ESA Workshop on Satellite Navigation Technologies and European Workshop on GNSS Signals and Signal Processing (NAVITEC)."
doi: 10.1109/NAVITEC.2010.5707981
location:
name: "ESA/ESTEC, Noordwijk, Netherlands."
month: 12
pages: 8
scope: "Seminal work on GNSS-SDR and its software design patterns."
title: "Design patterns for GNSS software receivers"
type: conference-paper
year: 2010
repository-code: "https://github.com/gnss-sdr/gnss-sdr"
title: GNSS-SDR
type: software
url: "https://gnss-sdr.org"
version: "0.0.19"

File diff suppressed because it is too large Load Diff

142
CODE_OF_CONDUCT.md Normal file
View File

@ -0,0 +1,142 @@
<!-- prettier-ignore-start -->
[comment]: # (
SPDX-License-Identifier: CC-BY-4.0
)
[comment]: # (
SPDX-FileCopyrightText: 2017-2020 Carles Fernandez-Prades <carles.fernandez@cttc.es>
)
<!-- prettier-ignore-end -->
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the overall
community
Examples of unacceptable behavior include:
- The use of sexualized language or imagery, and sexual attention or advances of
any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email address,
without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
carles.fernandez@cttc.es All complaints will be reviewed and investigated
promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series of
actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within the
community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder][mozilla coc].
For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][faq]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].
[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[mozilla coc]: https://github.com/mozilla/diversity
[faq]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations

207
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,207 @@
# Contributing to GNSS-SDR
<!-- prettier-ignore-start -->
[comment]: # (
SPDX-License-Identifier: GPL-3.0-or-later
)
[comment]: # (
SPDX-FileCopyrightText: 2011-2021 Carles Fernandez-Prades <carles.fernandez@cttc.es>
)
<!-- prettier-ignore-end -->
:+1::tada: Thanks for taking the time to contribute! :tada::+1:
Third-party contributions are essential for keeping GNSS-SDR continuously
improving. We simply cannot access the huge number of platforms and myriad
configurations for running GNSS-SDR. We want to keep it as easy as possible to
contribute changes that get things working in your environment. There are a few
guidelines that we need contributors to follow so that we can have a chance of
keeping on top of things.
The following is a set of guidelines for contributing to GNSS-SDR, which is
hosted in the [GNSS-SDR Organization](https://github.com/gnss-sdr) on GitHub.
These are just guidelines, not rules. Use your best judgment, and feel free to
propose changes to this document in a
[pull request](#how-to-submit-a-pull-request).
## Code of Conduct
This project adheres to the Contributor Covenant
[code of conduct](CODE_OF_CONDUCT.md). By participating, you are expected to
uphold this code. Please report unacceptable behavior.
## Reporting an issue
Have you found a bug in the code which is not in the
[list of known bugs](https://github.com/gnss-sdr/gnss-sdr/issues)? Do you have a
suggestion for improvement? Then by all means please
[submit a new issue](https://github.com/gnss-sdr/gnss-sdr/issues/new), and do
not hesitate to comment on existing
[open issues](https://github.com/gnss-sdr/gnss-sdr/issues).
When filling a new issue, please remember to:
- **Use a clear and descriptive title** for the issue to identify the problem.
- **Describe the exact steps which reproduce the problem** in as many details as
possible. For example, start by describing your computing platform (Operating
System and version, how did you installed GNSS-SDR and its dependencies, what
file or front-end are you using as a signal source, etc.). You can also
include the configuration file you are using, or a dump of the terminal output
you are getting. The more information you provide, the more chances to get
useful answers.
- **Please be patient**. This organization is run on a volunteer basis, so it
can take some time to the Developer Team to reach your issue. They will do
their best to fix it as soon as possible.
- If you opened an issue that is now solved, it is a good practice to **close
it**.
The list of [open issues](https://github.com/gnss-sdr/gnss-sdr/issues) can be a
good starting point and a source of ideas if you are looking to contribute to
the source code.
## Contributing to the source code
### Preliminaries
1. If you still have not done so,
[create your personal account on GitHub](https://github.com/join).
2. [Fork GNSS-SDR from GitHub](https://github.com/gnss-sdr/gnss-sdr/fork). This
will copy the whole gnss-sdr repository to your personal account.
3. Then, go to your favorite working folder in your computer and clone your
forked repository by typing (replacing `YOUR_USERNAME` by the actual
username of your GitHub account):
$ git clone https://github.com/YOUR_USERNAME/gnss-sdr
4. Your forked repository https://github.com/YOUR_USERNAME/gnss-sdr will
receive the default name of `origin`. You can also add the original gnss-sdr
repository, which is usually referred to as `upstream`:
$ cd gnss-sdr
$ git remote add upstream https://github.com/gnss-sdr/gnss-sdr.git
To verify the new upstream repository you have specified for your fork, type
`git remote -v`. You should see the URL for your fork as `origin`, and the URL
for the original repository as `upstream`:
```
$ git remote -v
origin https://github.com/YOUR_USERNAME/gnss-sdr.git (fetch)
origin https://github.com/YOUR_USERNAME/gnss-sdr.git (push)
upstream https://github.com/gnss-sdr/gnss-sdr.git (fetch)
upstream https://github.com/gnss-sdr/gnss-sdr.git (push)
```
### Start working on your contribution
Checkout the `next` branch of the git repository in order to get synchronized
with the latest development code:
```
$ git checkout next
$ git pull upstream next
```
When start working in a new improvement, please **always** branch off from
`next`. Open a new branch and start working on it:
```
$ git checkout -b my_feature
```
Now you can do changes, add files, do commits (please take a look at
[how to write good commit messages](https://chris.beams.io/posts/git-commit/),
and do not forget to
[sign your commits](https://gnss-sdr.org/docs/tutorials/using-git/#sign-your-commits)
if you plan to submit your code to the upstream repository in a pull-request,
see below) and push them to your repository:
```
$ git push origin my_feature
```
If there have been new pushes to the `next` branch of the `upstream` repository
since the last time you pulled from it, you might want to put your commits on
top of them (this is mandatory for pull requests):
```
$ git pull --rebase upstream next
```
### How to submit a pull request
Any code contributions going into GNSS-SDR will become part of a GPL-licensed,
open source repository. It is therefore imperative that code submissions belong
to the authors, and that submitters have the authority to merge that code into
the public GNSS-SDR codebase.
For that purpose, we use the
[Developer's Certificate of Origin](https://github.com/gnss-sdr/gnss-sdr/blob/next/.github/DCO.txt).
It is the same document used by other projects. Signing the DCO states that
there are no legal reasons to not merge your code.
To sign the DCO, suffix your git commits with a `Signed-off-by:` line. When
using the command line, you can use `git commit -s` to automatically add this
line. If there were multiple authors of the code, or other types of
stakeholders, make sure that all are listed, each with a separate
`Signed-off-by:` line. See
[how to sign commits](https://gnss-sdr.org/docs/tutorials/using-git/#sign-your-commits)
for details on how to tell Git to sign commits by default.
Before submitting your code, please be sure to
[apply clang-format](https://gnss-sdr.org/coding-style/#use-tools-for-automated-code-formatting).
When the contribution is ready, you can
[submit a pull request](https://github.com/gnss-sdr/gnss-sdr/compare/). Head to
your GitHub repository, switch to your `my_feature` branch, and click the
_**Pull Request**_ button, which will do all the work for you. Code comparison
must be always to the `next` branch.
Once a pull request is sent, the Developer Team can review the set of changes,
discuss potential modifications, and even push follow-up commits if necessary.
Some things that will increase the chance that your pull request is accepted:
- Your commits must be signed.
- Avoid platform-dependent code. If your code require external dependencies,
they must be available as packages in
[Debian OldStable](https://wiki.debian.org/DebianOldStable).
- Write tests.
- Follow our [coding style guide](https://gnss-sdr.org/coding-style/).
Specifically, please make sure that you have applied
[clang-format](https://clang.llvm.org/docs/ClangFormat.html) and
[clang-tidy](https://clang.llvm.org/extra/clang-tidy/) to your changes before
you do your pull request. Please check the
[final recommendations](https://gnss-sdr.org/coding-style/#final-recommendations)
for guidelines on how to apply those tools.
- Write a descriptive and detailed summary. Please consider that reviewing pull
requests is hard, so include as much information as possible to make your pull
request's intent clear.
For more details about Git usage, please check out
[our tutorial](https://gnss-sdr.org/docs/tutorials/using-git/).
## Contributing to the website
The content of https://gnss-sdr.org lives in a GitHub repository at
https://github.com/gnss-sdr/geniuss-place
You can fork that repository, reproduce the entire website on your computer
using [Jekyll](https://jekyllrb.com/), do changes and submit pull requests, just
as explained above. For more details, please check out
[how to contribute](https://gnss-sdr.org/contribute/).
Last but not the least, you can leave your comments on the website.
---
![GeNiuSS
contributes](https://gnss-sdr.org/assets/images/geniuss-contribute.png)
Thanks for your contribution to GNSS-SDR!

View File

@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
<https://www.gnu.org/philosophy/why-not-lgpl.html>.

208
LICENSES/Apache-2.0.txt Normal file
View File

@ -0,0 +1,208 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION,
AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution
as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright
owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities
that control, are controlled by, or are under common control with that entity.
For the purposes of this definition, "control" means (i) the power, direct
or indirect, to cause the direction or management of such entity, whether
by contract or otherwise, or (ii) ownership of fifty percent (50%) or more
of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions
granted by this License.
"Source" form shall mean the preferred form for making modifications, including
but not limited to software source code, documentation source, and configuration
files.
"Object" form shall mean any form resulting from mechanical transformation
or translation of a Source form, including but not limited to compiled object
code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form,
made available under the License, as indicated by a copyright notice that
is included in or attached to the work (an example is provided in the Appendix
below).
"Derivative Works" shall mean any work, whether in Source or Object form,
that is based on (or derived from) the Work and for which the editorial revisions,
annotations, elaborations, or other modifications represent, as a whole, an
original work of authorship. For the purposes of this License, Derivative
Works shall not include works that remain separable from, or merely link (or
bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version
of the Work and any modifications or additions to that Work or Derivative
Works thereof, that is intentionally submitted to Licensor for inclusion in
the Work by the copyright owner or by an individual or Legal Entity authorized
to submit on behalf of the copyright owner. For the purposes of this definition,
"submitted" means any form of electronic, verbal, or written communication
sent to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems, and
issue tracking systems that are managed by, or on behalf of, the Licensor
for the purpose of discussing and improving the Work, but excluding communication
that is conspicuously marked or otherwise designated in writing by the copyright
owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
of whom a Contribution has been received by Licensor and subsequently incorporated
within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this
License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive,
no-charge, royalty-free, irrevocable copyright license to reproduce, prepare
Derivative Works of, publicly display, publicly perform, sublicense, and distribute
the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License,
each Contributor hereby grants to You a perpetual, worldwide, non-exclusive,
no-charge, royalty-free, irrevocable (except as stated in this section) patent
license to make, have made, use, offer to sell, sell, import, and otherwise
transfer the Work, where such license applies only to those patent claims
licensable by such Contributor that are necessarily infringed by their Contribution(s)
alone or by combination of their Contribution(s) with the Work to which such
Contribution(s) was submitted. If You institute patent litigation against
any entity (including a cross-claim or counterclaim in a lawsuit) alleging
that the Work or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses granted to You
under this License for that Work shall terminate as of the date such litigation
is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or
Derivative Works thereof in any medium, with or without modifications, and
in Source or Object form, provided that You meet the following conditions:
(a) You must give any other recipients of the Work or Derivative Works a copy
of this License; and
(b) You must cause any modified files to carry prominent notices stating that
You changed the files; and
(c) You must retain, in the Source form of any Derivative Works that You distribute,
all copyright, patent, trademark, and attribution notices from the Source
form of the Work, excluding those notices that do not pertain to any part
of the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its distribution,
then any Derivative Works that You distribute must include a readable copy
of the attribution notices contained within such NOTICE file, excluding those
notices that do not pertain to any part of the Derivative Works, in at least
one of the following places: within a NOTICE text file distributed as part
of the Derivative Works; within the Source form or documentation, if provided
along with the Derivative Works; or, within a display generated by the Derivative
Works, if and wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and do not modify the
License. You may add Your own attribution notices within Derivative Works
that You distribute, alongside or as an addendum to the NOTICE text from the
Work, provided that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and may provide
additional or different license terms and conditions for use, reproduction,
or distribution of Your modifications, or for any such Derivative Works as
a whole, provided Your use, reproduction, and distribution of the Work otherwise
complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any
Contribution intentionally submitted for inclusion in the Work by You to the
Licensor shall be under the terms and conditions of this License, without
any additional terms or conditions. Notwithstanding the above, nothing herein
shall supersede or modify the terms of any separate license agreement you
may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names,
trademarks, service marks, or product names of the Licensor, except as required
for reasonable and customary use in describing the origin of the Work and
reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to
in writing, Licensor provides the Work (and each Contributor provides its
Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied, including, without limitation, any warranties
or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR
A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness
of using or redistributing the Work and assume any risks associated with Your
exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether
in tort (including negligence), contract, or otherwise, unless required by
applicable law (such as deliberate and grossly negligent acts) or agreed to
in writing, shall any Contributor be liable to You for damages, including
any direct, indirect, special, incidental, or consequential damages of any
character arising as a result of this License or out of the use or inability
to use the Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all other commercial
damages or losses), even if such Contributor has been advised of the possibility
of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work
or Derivative Works thereof, You may choose to offer, and charge a fee for,
acceptance of support, warranty, indemnity, or other liability obligations
and/or rights consistent with this License. However, in accepting such obligations,
You may act only on Your own behalf and on Your sole responsibility, not on
behalf of any other Contributor, and only if You agree to indemnify, defend,
and hold each Contributor harmless for any liability incurred by, or claims
asserted against, such Contributor by reason of your accepting any such warranty
or additional liability. END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following boilerplate
notice, with the fields enclosed by brackets "[]" replaced with your own identifying
information. (Don't include the brackets!) The text should be enclosed in
the appropriate comment syntax for the file format. We also recommend that
a file or class name and description of purpose be included on the same "printed
page" as the copyright notice for easier identification within third-party
archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

18
LICENSES/BSD-1-Clause.txt Normal file
View File

@ -0,0 +1,18 @@
Copyright (c) <year> <owner> All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

22
LICENSES/BSD-2-Clause.txt Normal file
View File

@ -0,0 +1,22 @@
Copyright (c) <year> <owner>. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

26
LICENSES/BSD-3-Clause.txt Normal file
View File

@ -0,0 +1,26 @@
Copyright (c) <year> <owner>. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

324
LICENSES/CC-BY-4.0.txt Normal file
View File

@ -0,0 +1,324 @@
Creative Commons Attribution 4.0 International Creative Commons Corporation
("Creative Commons") is not a law firm and does not provide legal services
or legal advice. Distribution of Creative Commons public licenses does not
create a lawyer-client or other relationship. Creative Commons makes its licenses
and related information available on an "as-is" basis. Creative Commons gives
no warranties regarding its licenses, any material licensed under their terms
and conditions, or any related information. Creative Commons disclaims all
liability for damages resulting from their use to the fullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and conditions
that creators and other rights holders may use to share original works of
authorship and other material subject to copyright and certain other rights
specified in the public license below. The following considerations are for
informational purposes only, are not exhaustive, and do not form part of our
licenses.
Considerations for licensors: Our public licenses are intended for use by
those authorized to give the public permission to use material in ways otherwise
restricted by copyright and certain other rights. Our licenses are irrevocable.
Licensors should read and understand the terms and conditions of the license
they choose before applying it. Licensors should also secure all rights necessary
before applying our licenses so that the public can reuse the material as
expected. Licensors should clearly mark any material not subject to the license.
This includes other CC-licensed material, or material used under an exception
or limitation to copyright. More considerations for licensors : wiki.creativecommons.org/Considerations_for_licensors
Considerations for the public: By using one of our public licenses, a licensor
grants the public permission to use the licensed material under specified
terms and conditions. If the licensor's permission is not necessary for any
reasonfor example, because of any applicable exception or limitation to copyrightthen
that use is not regulated by the license. Our licenses grant only permissions
under copyright and certain other rights that a licensor has authority to
grant. Use of the licensed material may still be restricted for other reasons,
including because others have copyright or other rights in the material. A
licensor may make special requests, such as asking that all changes be marked
or described. Although not required by our licenses, you are encouraged to
respect those requests where reasonable. More considerations for the public
: wiki.creativecommons.org/Considerations_for_licensees Creative Commons Attribution
4.0 International Public License
By exercising the Licensed Rights (defined below), You accept and agree to
be bound by the terms and conditions of this Creative Commons Attribution
4.0 International Public License ("Public License"). To the extent this Public
License may be interpreted as a contract, You are granted the Licensed Rights
in consideration of Your acceptance of these terms and conditions, and the
Licensor grants You such rights in consideration of benefits the Licensor
receives from making the Licensed Material available under these terms and
conditions.
Section 1 Definitions.
a. Adapted Material means material subject to Copyright and Similar Rights
that is derived from or based upon the Licensed Material and in which the
Licensed Material is translated, altered, arranged, transformed, or otherwise
modified in a manner requiring permission under the Copyright and Similar
Rights held by the Licensor. For purposes of this Public License, where the
Licensed Material is a musical work, performance, or sound recording, Adapted
Material is always produced where the Licensed Material is synched in timed
relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright and Similar
Rights in Your contributions to Adapted Material in accordance with the terms
and conditions of this Public License.
c. Copyright and Similar Rights means copyright and/or similar rights closely
related to copyright including, without limitation, performance, broadcast,
sound recording, and Sui Generis Database Rights, without regard to how the
rights are labeled or categorized. For purposes of this Public License, the
rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
d. Effective Technological Measures means those measures that, in the absence
of proper authority, may not be circumvented under laws fulfilling obligations
under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996,
and/or similar international agreements.
e. Exceptions and Limitations means fair use, fair dealing, and/or any other
exception or limitation to Copyright and Similar Rights that applies to Your
use of the Licensed Material.
f. Licensed Material means the artistic or literary work, database, or other
material to which the Licensor applied this Public License.
g. Licensed Rights means the rights granted to You subject to the terms and
conditions of this Public License, which are limited to all Copyright and
Similar Rights that apply to Your use of the Licensed Material and that the
Licensor has authority to license.
h. Licensor means the individual(s) or entity(ies) granting rights under this
Public License.
i. Share means to provide material to the public by any means or process that
requires permission under the Licensed Rights, such as reproduction, public
display, public performance, distribution, dissemination, communication, or
importation, and to make material available to the public including in ways
that members of the public may access the material from a place and at a time
individually chosen by them.
j. Sui Generis Database Rights means rights other than copyright resulting
from Directive 96/9/EC of the European Parliament and of the Council of 11
March 1996 on the legal protection of databases, as amended and/or succeeded,
as well as other essentially equivalent rights anywhere in the world.
k. You means the individual or entity exercising the Licensed Rights under
this Public License. Your has a corresponding meaning.
Section 2 Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License, the Licensor
hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive,
irrevocable license to exercise the Licensed Rights in the Licensed Material
to:
A. reproduce and Share the Licensed Material, in whole or in part; and
B. produce, reproduce, and Share Adapted Material.
2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions
and Limitations apply to Your use, this Public License does not apply, and
You do not need to comply with its terms and conditions.
3. Term. The term of this Public License is specified in Section 6(a).
4. Media and formats; technical modifications allowed. The Licensor authorizes
You to exercise the Licensed Rights in all media and formats whether now known
or hereafter created, and to make technical modifications necessary to do
so. The Licensor waives and/or agrees not to assert any right or authority
to forbid You from making technical modifications necessary to exercise the
Licensed Rights, including technical modifications necessary to circumvent
Effective Technological Measures. For purposes of this Public License, simply
making modifications authorized by this Section 2(a)(4) never produces Adapted
Material.
5. Downstream recipients.
A. Offer from the Licensor Licensed Material. Every recipient of the Licensed
Material automatically receives an offer from the Licensor to exercise the
Licensed Rights under the terms and conditions of this Public License.
B. No downstream restrictions. You may not offer or impose any additional
or different terms or conditions on, or apply any Effective Technological
Measures to, the Licensed Material if doing so restricts exercise of the Licensed
Rights by any recipient of the Licensed Material.
6. No endorsement. Nothing in this Public License constitutes or may be construed
as permission to assert or imply that You are, or that Your use of the Licensed
Material is, connected with, or sponsored, endorsed, or granted official status
by, the Licensor or others designated to receive attribution as provided in
Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not licensed under this
Public License, nor are publicity, privacy, and/or other similar personality
rights; however, to the extent possible, the Licensor waives and/or agrees
not to assert any such rights held by the Licensor to the limited extent necessary
to allow You to exercise the Licensed Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this Public License.
3. To the extent possible, the Licensor waives any right to collect royalties
from You for the exercise of the Licensed Rights, whether directly or through
a collecting society under any voluntary or waivable statutory or compulsory
licensing scheme. In all other cases the Licensor expressly reserves any right
to collect such royalties.
Section 3 License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the following
conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified form), You must:
A. retain the following if it is supplied by the Licensor with the Licensed
Material:
i. identification of the creator(s) of the Licensed Material and any others
designated to receive attribution, in any reasonable manner requested by the
Licensor (including by pseudonym if designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of warranties;
v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
B. indicate if You modified the Licensed Material and retain an indication
of any previous modifications; and
C. indicate the Licensed Material is licensed under this Public License, and
include the text of, or the URI or hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner
based on the medium, means, and context in which You Share the Licensed Material.
For example, it may be reasonable to satisfy the conditions by providing a
URI or hyperlink to a resource that includes the required information.
3. If requested by the Licensor, You must remove any of the information required
by Section 3(a)(1)(A) to the extent reasonably practicable.
4. If You Share Adapted Material You produce, the Adapter's License You apply
must not prevent recipients of the Adapted Material from complying with this
Public License.
Section 4 Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that apply to
Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract,
reuse, reproduce, and Share all or a substantial portion of the contents of
the database;
b. if You include all or a substantial portion of the database contents in
a database in which You have Sui Generis Database Rights, then the database
in which You have Sui Generis Database Rights (but not its individual contents)
is Adapted Material; and
c. You must comply with the conditions in Section 3(a) if You Share all or
a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not replace
Your obligations under this Public License where the Licensed Rights include
other Copyright and Similar Rights.
Section 5 Disclaimer of Warranties and Limitation of Liability.
a. Unless otherwise separately undertaken by the Licensor, to the extent possible,
the Licensor offers the Licensed Material as-is and as-available, and makes
no representations or warranties of any kind concerning the Licensed Material,
whether express, implied, statutory, or other. This includes, without limitation,
warranties of title, merchantability, fitness for a particular purpose, non-infringement,
absence of latent or other defects, accuracy, or the presence or absence of
errors, whether or not known or discoverable. Where disclaimers of warranties
are not allowed in full or in part, this disclaimer may not apply to You.
b. To the extent possible, in no event will the Licensor be liable to You
on any legal theory (including, without limitation, negligence) or otherwise
for any direct, special, indirect, incidental, consequential, punitive, exemplary,
or other losses, costs, expenses, or damages arising out of this Public License
or use of the Licensed Material, even if the Licensor has been advised of
the possibility of such losses, costs, expenses, or damages. Where a limitation
of liability is not allowed in full or in part, this limitation may not apply
to You.
c. The disclaimer of warranties and limitation of liability provided above
shall be interpreted in a manner that, to the extent possible, most closely
approximates an absolute disclaimer and waiver of all liability.
Section 6 Term and Termination.
a. This Public License applies for the term of the Copyright and Similar Rights
licensed here. However, if You fail to comply with this Public License, then
Your rights under this Public License terminate automatically.
b. Where Your right to use the Licensed Material has terminated under Section
6(a), it reinstates:
1. automatically as of the date the violation is cured, provided it is cured
within 30 days of Your discovery of the violation; or
2. upon express reinstatement by the Licensor.
c. For the avoidance of doubt, this Section 6(b) does not affect any right
the Licensor may have to seek remedies for Your violations of this Public
License.
d. For the avoidance of doubt, the Licensor may also offer the Licensed Material
under separate terms or conditions or stop distributing the Licensed Material
at any time; however, doing so will not terminate this Public License.
e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
Section 7 Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different terms or
conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the Licensed
Material not stated herein are separate from and independent of the terms
and conditions of this Public License.
Section 8 Interpretation.
a. For the avoidance of doubt, this Public License does not, and shall not
be interpreted to, reduce, limit, restrict, or impose conditions on any use
of the Licensed Material that could lawfully be made without permission under
this Public License.
b. To the extent possible, if any provision of this Public License is deemed
unenforceable, it shall be automatically reformed to the minimum extent necessary
to make it enforceable. If the provision cannot be reformed, it shall be severed
from this Public License without affecting the enforceability of the remaining
terms and conditions.
c. No term or condition of this Public License will be waived and no failure
to comply consented to unless expressly agreed to by the Licensor.
d. Nothing in this Public License constitutes or may be interpreted as a limitation
upon, or waiver of, any privileges and immunities that apply to the Licensor
or You, including from the legal processes of any jurisdiction or authority.
Creative Commons is not a party to its public licenses. Notwithstanding, Creative
Commons may elect to apply one of its public licenses to material it publishes
and in those instances will be considered the "Licensor." The text of the
Creative Commons public licenses is dedicated to the public domain under the
CC0 Public Domain Dedication. Except for the limited purpose of indicating
that material is shared under a Creative Commons public license or as otherwise
permitted by the Creative Commons policies published at creativecommons.org/policies,
Creative Commons does not authorize the use of the trademark "Creative Commons"
or any other trademark or logo of Creative Commons without its prior written
consent including, without limitation, in connection with any unauthorized
modifications to any of its public licenses or any other arrangements, understandings,
or agreements concerning use of licensed material. For the avoidance of doubt,
this paragraph does not form part of the public licenses.
Creative Commons may be contacted at creativecommons.org.

View File

@ -0,0 +1,625 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright © 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license
document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for software and
other kinds of works.
The licenses for most software and other practical works are designed to take
away your freedom to share and change the works. By contrast, the GNU General
Public License is intended to guarantee your freedom to share and change all
versions of a program--to make sure it remains free software for all its users.
We, the Free Software Foundation, use the GNU General Public License for most
of our software; it applies also to any other work released this way by its
authors. You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our
General Public Licenses are designed to make sure that you have the freedom
to distribute copies of free software (and charge for them if you wish), that
you receive source code or can get it if you want it, that you can change
the software or use pieces of it in new free programs, and that you know you
can do these things.
To protect your rights, we need to prevent others from denying you these rights
or asking you to surrender the rights. Therefore, you have certain responsibilities
if you distribute copies of the software, or if you modify it: responsibilities
to respect the freedom of others.
For example, if you distribute copies of such a program, whether gratis or
for a fee, you must pass on to the recipients the same freedoms that you received.
You must make sure that they, too, receive or can get the source code. And
you must show them these terms so they know their rights.
Developers that use the GNU GPL protect your rights with two steps: (1) assert
copyright on the software, and (2) offer you this License giving you legal
permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains that
there is no warranty for this free software. For both users' and authors'
sake, the GPL requires that modified versions be marked as changed, so that
their problems will not be attributed erroneously to authors of previous versions.
Some devices are designed to deny users access to install or run modified
versions of the software inside them, although the manufacturer can do so.
This is fundamentally incompatible with the aim of protecting users' freedom
to change the software. The systematic pattern of such abuse occurs in the
area of products for individuals to use, which is precisely where it is most
unacceptable. Therefore, we have designed this version of the GPL to prohibit
the practice for those products. If such problems arise substantially in other
domains, we stand ready to extend this provision to those domains in future
versions of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents. States
should not allow patents to restrict development and use of software on general-purpose
computers, but in those that do, we wish to avoid the special danger that
patents applied to a free program could make it effectively proprietary. To
prevent this, the GPL assures that patents cannot be used to render the program
non-free.
The precise terms and conditions for copying, distribution and modification
follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of works,
such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this License.
Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals
or organizations.
To "modify" a work means to copy from or adapt all or part of the work in
a fashion requiring copyright permission, other than the making of an exact
copy. The resulting work is called a "modified version" of the earlier work
or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based on the
Program.
To "propagate" a work means to do anything with it that, without permission,
would make you directly or secondarily liable for infringement under applicable
copyright law, except executing it on a computer or modifying a private copy.
Propagation includes copying, distribution (with or without modification),
making available to the public, and in some countries other activities as
well.
To "convey" a work means any kind of propagation that enables other parties
to make or receive copies. Mere interaction with a user through a computer
network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices" to the
extent that it includes a convenient and prominently visible feature that
(1) displays an appropriate copyright notice, and (2) tells the user that
there is no warranty for the work (except to the extent that warranties are
provided), that licensees may convey the work under this License, and how
to view a copy of this License. If the interface presents a list of user commands
or options, such as a menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work for making
modifications to it. "Object code" means any non-source form of a work.
A "Standard Interface" means an interface that either is an official standard
defined by a recognized standards body, or, in the case of interfaces specified
for a particular programming language, one that is widely used among developers
working in that language.
The "System Libraries" of an executable work include anything, other than
the work as a whole, that (a) is included in the normal form of packaging
a Major Component, but which is not part of that Major Component, and (b)
serves only to enable use of the work with that Major Component, or to implement
a Standard Interface for which an implementation is available to the public
in source code form. A "Major Component", in this context, means a major essential
component (kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to produce
the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all the source
code needed to generate, install, and (for an executable work) run the object
code and to modify the work, including scripts to control those activities.
However, it does not include the work's System Libraries, or general-purpose
tools or generally available free programs which are used unmodified in performing
those activities but which are not part of the work. For example, Corresponding
Source includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically linked
subprograms that the work is specifically designed to require, such as by
intimate data communication or control flow between those subprograms and
other parts of the work.
The Corresponding Source need not include anything that users can regenerate
automatically from other parts of the Corresponding Source.
The Corresponding Source for a work in source code form is that same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of copyright
on the Program, and are irrevocable provided the stated conditions are met.
This License explicitly affirms your unlimited permission to run the unmodified
Program. The output from running a covered work is covered by this License
only if the output, given its content, constitutes a covered work. This License
acknowledges your rights of fair use or other equivalent, as provided by copyright
law.
You may make, run and propagate covered works that you do not convey, without
conditions so long as your license otherwise remains in force. You may convey
covered works to others for the sole purpose of having them make modifications
exclusively for you, or provide you with facilities for running those works,
provided that you comply with the terms of this License in conveying all material
for which you do not control copyright. Those thus making or running the covered
works for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of your copyrighted
material outside their relationship with you.
Conveying under any other circumstances is permitted solely under the conditions
stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological measure
under any applicable law fulfilling obligations under article 11 of the WIPO
copyright treaty adopted on 20 December 1996, or similar laws prohibiting
or restricting circumvention of such measures.
When you convey a covered work, you waive any legal power to forbid circumvention
of technological measures to the extent such circumvention is effected by
exercising rights under this License with respect to the covered work, and
you disclaim any intention to limit operation or modification of the work
as a means of enforcing, against the work's users, your or third parties'
legal rights to forbid circumvention of technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you receive
it, in any medium, provided that you conspicuously and appropriately publish
on each copy an appropriate copyright notice; keep intact all notices stating
that this License and any non-permissive terms added in accord with section
7 apply to the code; keep intact all notices of the absence of any warranty;
and give all recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey, and you
may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to produce
it from the Program, in the form of source code under the terms of section
4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified it, and
giving a relevant date.
b) The work must carry prominent notices stating that it is released under
this License and any conditions added under section 7. This requirement modifies
the requirement in section 4 to "keep intact all notices".
c) You must license the entire work, as a whole, under this License to anyone
who comes into possession of a copy. This License will therefore apply, along
with any applicable section 7 additional terms, to the whole of the work,
and all its parts, regardless of how they are packaged. This License gives
no permission to license the work in any other way, but it does not invalidate
such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display Appropriate
Legal Notices; however, if the Program has interactive interfaces that do
not display Appropriate Legal Notices, your work need not make them do so.
A compilation of a covered work with other separate and independent works,
which are not by their nature extensions of the covered work, and which are
not combined with it such as to form a larger program, in or on a volume of
a storage or distribution medium, is called an "aggregate" if the compilation
and its resulting copyright are not used to limit the access or legal rights
of the compilation's users beyond what the individual works permit. Inclusion
of a covered work in an aggregate does not cause this License to apply to
the other parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms of sections
4 and 5, provided that you also convey the machine-readable Corresponding
Source under the terms of this License, in one of these ways:
a) Convey the object code in, or embodied in, a physical product (including
a physical distribution medium), accompanied by the Corresponding Source fixed
on a durable physical medium customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product (including
a physical distribution medium), accompanied by a written offer, valid for
at least three years and valid for as long as you offer spare parts or customer
support for that product model, to give anyone who possesses the object code
either (1) a copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical medium customarily
used for software interchange, for a price no more than your reasonable cost
of physically performing this conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the written
offer to provide the Corresponding Source. This alternative is allowed only
occasionally and noncommercially, and only if you received the object code
with such an offer, in accord with subsection 6b.
d) Convey the object code by offering access from a designated place (gratis
or for a charge), and offer equivalent access to the Corresponding Source
in the same way through the same place at no further charge. You need not
require recipients to copy the Corresponding Source along with the object
code. If the place to copy the object code is a network server, the Corresponding
Source may be on a different server (operated by you or a third party) that
supports equivalent copying facilities, provided you maintain clear directions
next to the object code saying where to find the Corresponding Source. Regardless
of what server hosts the Corresponding Source, you remain obligated to ensure
that it is available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided you inform
other peers where the object code and Corresponding Source of the work are
being offered to the general public at no charge under subsection 6d.
A separable portion of the object code, whose source code is excluded from
the Corresponding Source as a System Library, need not be included in conveying
the object code work.
A "User Product" is either (1) a "consumer product", which means any tangible
personal property which is normally used for personal, family, or household
purposes, or (2) anything designed or sold for incorporation into a dwelling.
In determining whether a product is a consumer product, doubtful cases shall
be resolved in favor of coverage. For a particular product received by a particular
user, "normally used" refers to a typical or common use of that class of product,
regardless of the status of the particular user or of the way in which the
particular user actually uses, or expects or is expected to use, the product.
A product is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent the
only significant mode of use of the product.
"Installation Information" for a User Product means any methods, procedures,
authorization keys, or other information required to install and execute modified
versions of a covered work in that User Product from a modified version of
its Corresponding Source. The information must suffice to ensure that the
continued functioning of the modified object code is in no case prevented
or interfered with solely because modification has been made.
If you convey an object code work under this section in, or with, or specifically
for use in, a User Product, and the conveying occurs as part of a transaction
in which the right of possession and use of the User Product is transferred
to the recipient in perpetuity or for a fixed term (regardless of how the
transaction is characterized), the Corresponding Source conveyed under this
section must be accompanied by the Installation Information. But this requirement
does not apply if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has been installed
in ROM).
The requirement to provide Installation Information does not include a requirement
to continue to provide support service, warranty, or updates for a work that
has been modified or installed by the recipient, or for the User Product in
which it has been modified or installed. Access to a network may be denied
when the modification itself materially and adversely affects the operation
of the network or violates the rules and protocols for communication across
the network.
Corresponding Source conveyed, and Installation Information provided, in accord
with this section must be in a format that is publicly documented (and with
an implementation available to the public in source code form), and must require
no special password or key for unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this License
by making exceptions from one or more of its conditions. Additional permissions
that are applicable to the entire Program shall be treated as though they
were included in this License, to the extent that they are valid under applicable
law. If additional permissions apply only to part of the Program, that part
may be used separately under those permissions, but the entire Program remains
governed by this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option remove any
additional permissions from that copy, or from any part of it. (Additional
permissions may be written to require their own removal in certain cases when
you modify the work.) You may place additional permissions on material, added
by you to a covered work, for which you have or can give appropriate copyright
permission.
Notwithstanding any other provision of this License, for material you add
to a covered work, you may (if authorized by the copyright holders of that
material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the terms of
sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or author
attributions in that material or in the Appropriate Legal Notices displayed
by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or requiring
that modified versions of such material be marked in reasonable ways as different
from the original version; or
d) Limiting the use for publicity purposes of names of licensors or authors
of the material; or
e) Declining to grant rights under trademark law for use of some trade names,
trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that material by
anyone who conveys the material (or modified versions of it) with contractual
assumptions of liability to the recipient, for any liability that these contractual
assumptions directly impose on those licensors and authors.
All other non-permissive additional terms are considered "further restrictions"
within the meaning of section 10. If the Program as you received it, or any
part of it, contains a notice stating that it is governed by this License
along with a term that is a further restriction, you may remove that term.
If a license document contains a further restriction but permits relicensing
or conveying under this License, you may add to a covered work material governed
by the terms of that license document, provided that the further restriction
does not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you must place,
in the relevant source files, a statement of the additional terms that apply
to those files, or a notice indicating where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the form
of a separately written license, or stated as exceptions; the above requirements
apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly provided
under this License. Any attempt otherwise to propagate or modify it is void,
and will automatically terminate your rights under this License (including
any patent licenses granted under the third paragraph of section 11).
However, if you cease all violation of this License, then your license from
a particular copyright holder is reinstated (a) provisionally, unless and
until the copyright holder explicitly and finally terminates your license,
and (b) permanently, if the copyright holder fails to notify you of the violation
by some reasonable means prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is reinstated permanently
if the copyright holder notifies you of the violation by some reasonable means,
this is the first time you have received notice of violation of this License
(for any work) from that copyright holder, and you cure the violation prior
to 30 days after your receipt of the notice.
Termination of your rights under this section does not terminate the licenses
of parties who have received copies or rights from you under this License.
If your rights have been terminated and not permanently reinstated, you do
not qualify to receive new licenses for the same material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or run a copy
of the Program. Ancillary propagation of a covered work occurring solely as
a consequence of using peer-to-peer transmission to receive a copy likewise
does not require acceptance. However, nothing other than this License grants
you permission to propagate or modify any covered work. These actions infringe
copyright if you do not accept this License. Therefore, by modifying or propagating
a covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically receives
a license from the original licensors, to run, modify and propagate that work,
subject to this License. You are not responsible for enforcing compliance
by third parties with this License.
An "entity transaction" is a transaction transferring control of an organization,
or substantially all assets of one, or subdividing an organization, or merging
organizations. If propagation of a covered work results from an entity transaction,
each party to that transaction who receives a copy of the work also receives
whatever licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the Corresponding
Source of the work from the predecessor in interest, if the predecessor has
it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the rights
granted or affirmed under this License. For example, you may not impose a
license fee, royalty, or other charge for exercise of rights granted under
this License, and you may not initiate litigation (including a cross-claim
or counterclaim in a lawsuit) alleging that any patent claim is infringed
by making, using, selling, offering for sale, or importing the Program or
any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this License
of the Program or a work on which the Program is based. The work thus licensed
is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims owned or controlled
by the contributor, whether already acquired or hereafter acquired, that would
be infringed by some manner, permitted by this License, of making, using,
or selling its contributor version, but do not include claims that would be
infringed only as a consequence of further modification of the contributor
version. For purposes of this definition, "control" includes the right to
grant patent sublicenses in a manner consistent with the requirements of this
License.
Each contributor grants you a non-exclusive, worldwide, royalty-free patent
license under the contributor's essential patent claims, to make, use, sell,
offer for sale, import and otherwise run, modify and propagate the contents
of its contributor version.
In the following three paragraphs, a "patent license" is any express agreement
or commitment, however denominated, not to enforce a patent (such as an express
permission to practice a patent or covenant not to sue for patent infringement).
To "grant" such a patent license to a party means to make such an agreement
or commitment not to enforce a patent against the party.
If you convey a covered work, knowingly relying on a patent license, and the
Corresponding Source of the work is not available for anyone to copy, free
of charge and under the terms of this License, through a publicly available
network server or other readily accessible means, then you must either (1)
cause the Corresponding Source to be so available, or (2) arrange to deprive
yourself of the benefit of the patent license for this particular work, or
(3) arrange, in a manner consistent with the requirements of this License,
to extend the patent license to downstream recipients. "Knowingly relying"
means you have actual knowledge that, but for the patent license, your conveying
the covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that country
that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or arrangement,
you convey, or propagate by procuring conveyance of, a covered work, and grant
a patent license to some of the parties receiving the covered work authorizing
them to use, propagate, modify or convey a specific copy of the covered work,
then the patent license you grant is automatically extended to all recipients
of the covered work and works based on it.
A patent license is "discriminatory" if it does not include within the scope
of its coverage, prohibits the exercise of, or is conditioned on the non-exercise
of one or more of the rights that are specifically granted under this License.
You may not convey a covered work if you are a party to an arrangement with
a third party that is in the business of distributing software, under which
you make payment to the third party based on the extent of your activity of
conveying the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory patent
license (a) in connection with copies of the covered work conveyed by you
(or copies made from those copies), or (b) primarily for and in connection
with specific products or compilations that contain the covered work, unless
you entered into that arrangement, or that patent license was granted, prior
to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting any implied
license or other defenses to infringement that may otherwise be available
to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or otherwise)
that contradict the conditions of this License, they do not excuse you from
the conditions of this License. If you cannot convey a covered work so as
to satisfy simultaneously your obligations under this License and any other
pertinent obligations, then as a consequence you may not convey it at all.
For example, if you agree to terms that obligate you to collect a royalty
for further conveying from those to whom you convey the Program, the only
way you could satisfy both those terms and this License would be to refrain
entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have permission to
link or combine any covered work with a work licensed under version 3 of the
GNU Affero General Public License into a single combined work, and to convey
the resulting work. The terms of this License will continue to apply to the
part which is the covered work, but the special requirements of the GNU Affero
General Public License, section 13, concerning interaction through a network
will apply to the combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of the
GNU General Public License from time to time. Such new versions will be similar
in spirit to the present version, but may differ in detail to address new
problems or concerns.
Each version is given a distinguishing version number. If the Program specifies
that a certain numbered version of the GNU General Public License "or any
later version" applies to it, you have the option of following the terms and
conditions either of that numbered version or of any later version published
by the Free Software Foundation. If the Program does not specify a version
number of the GNU General Public License, you may choose any version ever
published by the Free Software Foundation.
If the Program specifies that a proxy can decide which future versions of
the GNU General Public License can be used, that proxy's public statement
of acceptance of a version permanently authorizes you to choose that version
for the Program.
Later license versions may give you additional or different permissions. However,
no additional obligations are imposed on any author or copyright holder as
a result of your choosing to follow a later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM
PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM
AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO
USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE
PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided above cannot
be given local legal effect according to their terms, reviewing courts shall
apply local law that most closely approximates an absolute waiver of all civil
liability in connection with the Program, unless a warranty or assumption
of liability accompanies a copy of the Program in return for a fee. END OF
TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest possible
use to the public, the best way to achieve this is to make it free software
which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach
them to the start of each source file to most effectively state the exclusion
of warranty; and each file should have at least the "copyright" line and a
pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short notice like
this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it under certain
conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands might
be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary. For
more information on this, and how to apply and follow the GNU GPL, see <https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General Public
License instead of this License. But first, please read <https://www.gnu.org/
licenses /why-not-lgpl.html>.

163
LICENSES/LGPL-3.0-only.txt Normal file
View File

@ -0,0 +1,163 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license
document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates the terms
and conditions of version 3 of the GNU General Public License, supplemented
by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser General
Public License, and the "GNU GPL" refers to version 3 of the GNU General Public
License.
"The Library" refers to a covered work governed by this License, other than
an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided by the
Library, but which is not otherwise based on the Library. Defining a subclass
of a class defined by the Library is deemed a mode of using an interface provided
by the Library.
A "Combined Work" is a work produced by combining or linking an Application
with the Library. The particular version of the Library with which the Combined
Work was made is also called the "Linked Version".
The "Minimal Corresponding Source" for a Combined Work means the Corresponding
Source for the Combined Work, excluding any source code for portions of the
Combined Work that, considered in isolation, are based on the Application,
and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the object
code and/or source code for the Application, including any data and utility
programs needed for reproducing the Combined Work from the Application, but
excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License without
being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a facility
refers to a function or data to be supplied by an Application that uses the
facility (other than as an argument passed when the facility is invoked),
then you may convey a copy of the modified version:
a) under this License, provided that you make a good faith effort to ensure
that, in the event an Application does not supply the function or data, the
facility still operates, and performs whatever part of its purpose remains
meaningful, or
b) under the GNU GPL, with none of the additional permissions of this License
applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from a header
file that is part of the Library. You may convey such object code under terms
of your choice, provided that, if the incorporated material is not limited
to numerical parameters, data structure layouts and accessors, or small macros,
inline functions and templates (ten or fewer lines in length), you do both
of the following:
a) Give prominent notice with each copy of the object code that the Library
is used in it and that the Library and its use are covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that, taken together,
effectively do not restrict modification of the portions of the Library contained
in the Combined Work and reverse engineering for debugging such modifications,
if you also do each of the following:
a) Give prominent notice with each copy of the Combined Work that the Library
is used in it and that the Library and its use are covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during execution, include
the copyright notice for the Library among these notices, as well as a reference
directing the user to the copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this License,
and the Corresponding Application Code in a form suitable for, and under terms
that permit, the user to recombine or relink the Application with a modified
version of the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying Corresponding Source.
1) Use a suitable shared library mechanism for linking with the Library. A
suitable mechanism is one that (a) uses at run time a copy of the Library
already present on the user's computer system, and (b) will operate properly
with a modified version of the Library that is interface-compatible with the
Linked Version.
e) Provide Installation Information, but only if you would otherwise be required
to provide such information under section 6 of the GNU GPL, and only to the
extent that such information is necessary to install and execute a modified
version of the Combined Work produced by recombining or relinking the Application
with a modified version of the Linked Version. (If you use option 4d0, the
Installation Information must accompany the Minimal Corresponding Source and
Corresponding Application Code. If you use option 4d1, you must provide the
Installation Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the Library side
by side in a single library together with other library facilities that are
not Applications and are not covered by this License, and convey such a combined
library under terms of your choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based on the
Library, uncombined with any other library facilities, conveyed under the
terms of this License.
b) Give prominent notice with the combined library that part of it is a work
based on the Library, and explaining where to find the accompanying uncombined
form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions of the
GNU Lesser General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to address
new problems or concerns.
Each version is given a distinguishing version number. If the Library as you
received it specifies that a certain numbered version of the GNU Lesser General
Public License "or any later version" applies to it, you have the option of
following the terms and conditions either of that published version or of
any later version published by the Free Software Foundation. If the Library
as you received it does not specify a version number of the GNU Lesser General
Public License, you may choose any version of the GNU Lesser General Public
License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide whether
future versions of the GNU Lesser General Public License shall apply, that
proxy's public statement of acceptance of any version is permanent authorization
for you to choose that version for the Library.

View File

@ -0,0 +1,36 @@
This Apple software is supplied to you by Apple Inc. ("Apple")
in consideration of your agreement to the following terms, and your use,
installation, modification or redistribution of this Apple software
constitutes acceptance of these terms. If you do not agree with these
terms, please do not use, install, modify or redistribute this Apple
software.
In consideration of your agreement to abide by the following terms, and
subject to these terms, Apple grants you a personal, non - exclusive
license, under Apple's copyrights in this original Apple software ( the
"Apple Software" ), to use, reproduce, modify and redistribute the Apple
Software, with or without modifications, in source and / or binary forms;
provided that if you redistribute the Apple Software in its entirety and
without modifications, you must retain this notice and the following text
and disclaimers in all such redistributions of the Apple Software. Neither
the name, trademarks, service marks or logos of Apple Inc. may be used to
endorse or promote products derived from the Apple Software without specific
prior written permission from Apple. Except as expressly stated in this
notice, no other rights or licenses, express or implied, are granted by
Apple herein, including but not limited to any patent rights that may be
infringed by your derivative works or by other works in which the Apple
Software may be incorporated.
The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO
WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
WARRANTIES OF NON - INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION
ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ( INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION ) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION
AND / OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER
UNDER THEORY OF CONTRACT, TORT ( INCLUDING NEGLIGENCE ), STRICT LIABILITY OR
OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

19
LICENSES/MIT.txt Normal file
View File

@ -0,0 +1,19 @@
MIT License Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

19
LICENSES/Zlib.txt Normal file
View File

@ -0,0 +1,19 @@
zlib License Copyright (c) <year> <copyright holders>
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the
use of this software.
Permission is granted to anyone to use this software for any purpose, including
commercial applications, and to alter it and redistribute it freely, subject
to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim
that you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is
not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.

2337
README.md

File diff suppressed because it is too large Load Diff

4
build/.gitignore vendored
View File

@ -1,4 +0,0 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

View File

@ -0,0 +1,62 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
# Avoid using the BLAS and LAPACK implementations that comes with the Accelerate
# framework, which causes a bug when the BeiDou constellation is enabled
if(NOT BLAS_ROOT)
set(BLAS_ROOT_USER_DEFINED /usr/local/lib)
else()
set(BLAS_ROOT_USER_DEFINED ${BLAS_ROOT})
endif()
if(DEFINED ENV{BLAS_ROOT})
set(BLAS_ROOT_USER_DEFINED
${BLAS_ROOT_USER_DEFINED}
$ENV{BLAS_ROOT}
)
endif()
find_library(BLAS_LIBRARIES
NAMES libblas.dylib libopenblas.dylib
PATHS
${BLAS_ROOT_USER_DEFINED}
${BLAS_ROOT_USER_DEFINED}/lapack
/opt/local/lib/lapack
/opt/local/lib/
/usr/local/opt/lapack/lib
/opt/homebrew/opt/lapack/lib
NO_DEFAULT_PATH
NO_SYSTEM_ENVIRONMENT_PATH
NO_CMAKE_ENVIRONMENT_PATH
NO_SYSTEM_ENVIRONMENT_PATH
NO_CMAKE_SYSTEM_PATH
)
if(BLAS_LIBRARIES)
set(BLAS_FOUND TRUE)
message(STATUS "BLAS library found at ${BLAS_LIBRARIES}")
endif()
find_library(LAPACK_LIBRARIES
liblapack.dylib
PATHS
${BLAS_ROOT_USER_DEFINED}
${BLAS_ROOT_USER_DEFINED}/lapack
/opt/local/lib/lapack
/usr/local/opt/lapack/lib
/opt/homebrew/opt/lapack/lib
NO_DEFAULT_PATH
NO_SYSTEM_ENVIRONMENT_PATH
NO_CMAKE_ENVIRONMENT_PATH
NO_SYSTEM_ENVIRONMENT_PATH
NO_CMAKE_SYSTEM_PATH
)
if(LAPACK_LIBRARIES)
set(LAPACK_FOUND TRUE)
message(STATUS "LAPACK library found at ${LAPACK_LIBRARIES}")
endif()

View File

@ -0,0 +1,166 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2023 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
# Downloads and builds the protoc compiler and static libraries of Protocol
# Buffers >= v22.0 (see https://protobuf.dev/) It requires CMake >= 3.10 and the
# abseil-cpp >= 20230117 libraries (see https://github.com/abseil/abseil-cpp)
# already installed. Zlib is used if found.
#
# Creates protobuf::libprotobuf and protobuf::protoc imported targets.
if(NOT GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION)
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "25.0")
endif()
if(NOT GNSSSDR_BINARY_DIR)
set(GNSSSDR_BINARY_DIR "${PROJECT_BINARY_DIR}")
endif()
if(NOT ZLIB_FOUND)
find_package(ZLIB)
set_package_properties(ZLIB PROPERTIES
URL "https://www.zlib.net/"
PURPOSE "Required to build Protocol Buffers."
TYPE REQUIRED
)
if(ZLIB_FOUND AND ZLIB_VERSION_STRING)
set_package_properties(ZLIB PROPERTIES
DESCRIPTION "A Massively Spiffy Yet Delicately Unobtrusive Compression Library (found: v${ZLIB_VERSION_STRING})"
)
else()
set_package_properties(ZLIB PROPERTIES
DESCRIPTION "A Massively Spiffy Yet Delicately Unobtrusive Compression Library"
)
endif()
if(ZLIB_FOUND)
set(ZLIB_LIBRARIES_ ${ZLIB_LIBRARIES})
set(USE_ZLIB -Dprotobuf_WITH_ZLIB=ON)
else()
set(ZLIB_LIBRARIES_ "")
set(USE_ZLIB -Dprotobuf_WITH_ZLIB=OFF)
endif()
else()
set(ZLIB_LIBRARIES_ ${ZLIB_LIBRARIES})
set(USE_ZLIB -Dprotobuf_WITH_ZLIB=ON)
endif()
include(GNUInstallDirs)
list(APPEND UTF8_LIBRARIES
${GNSSSDR_BINARY_DIR}/protobuf-${GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION}/${CMAKE_INSTALL_LIBDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}utf8_validity${CMAKE_STATIC_LIBRARY_SUFFIX}
${GNSSSDR_BINARY_DIR}/protobuf-${GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION}/${CMAKE_INSTALL_LIBDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}utf8_range${CMAKE_STATIC_LIBRARY_SUFFIX}
)
ExternalProject_Add(protobuf-${GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION}
PREFIX ${GNSSSDR_BINARY_DIR}/protobuf-${GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION}
GIT_REPOSITORY https://github.com/protocolbuffers/protobuf
GIT_TAG v${GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION}
GIT_PROGRESS ON
UPDATE_COMMAND ""
PATCH_COMMAND ${PROTOBUF_PATCH_COMMAND}
SOURCE_DIR ${GNSSSDR_BINARY_DIR}/thirdparty/protobuf/protobuf-${GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION}
BINARY_DIR ${GNSSSDR_BINARY_DIR}/protobuf-${GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION}
CMAKE_ARGS
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DBUILD_SHARED_LIBS=OFF
-DCMAKE_BUILD_TYPE=$<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo>$<$<CONFIG:MinSizeRel>:MinSizeRel>$<$<CONFIG:NoOptWithASM>:Debug>$<$<CONFIG:Coverage>:Debug>$<$<CONFIG:O2WithASM>:RelWithDebInfo>$<$<CONFIG:O3WithASM>:RelWithDebInfo>$<$<CONFIG:ASAN>:Debug>
-DCMAKE_CXX_VISIBILITY_PRESET=hidden
-DCMAKE_VISIBILITY_INLINES_HIDDEN=1
-DCMAKE_INSTALL_PREFIX=${GNSSSDR_BINARY_DIR}/protobuf-${GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION}
-Dprotobuf_BUILD_TESTS=OFF
-Dprotobuf_ABSL_PROVIDER=package
${USE_ZLIB}
BUILD_COMMAND ${CMAKE_COMMAND}
"--build" "${GNSSSDR_BINARY_DIR}/protobuf-${GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION}"
"--config" $<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo>$<$<CONFIG:MinSizeRel>:MinSizeRel>$<$<CONFIG:NoOptWithASM>:Debug>$<$<CONFIG:Coverage>:Debug>$<$<CONFIG:O2WithASM>:RelWithDebInfo>$<$<CONFIG:O3WithASM>:RelWithDebInfo>$<$<CONFIG:ASAN>:Debug>
"--target" install
BUILD_BYPRODUCTS ${GNSSSDR_BINARY_DIR}/protobuf-${GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION}/${CMAKE_INSTALL_LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}protobuf$<$<CONFIG:Debug>:d>${CMAKE_STATIC_LIBRARY_SUFFIX}
${GNSSSDR_BINARY_DIR}/protobuf-${GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION}/bin/protoc
${ABSL_LIBRARIES}
${UTF8_LIBRARIES}
INSTALL_COMMAND ""
)
file(MAKE_DIRECTORY ${GNSSSDR_BINARY_DIR}/protobuf-${GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION}/include)
file(MAKE_DIRECTORY ${GNSSSDR_BINARY_DIR}/protobuf-${GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION}/${CMAKE_INSTALL_LIBDIR})
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
find_library(CoreFoundation CoreFoundation)
else()
set(CoreFoundation "")
endif()
set(PROTOBUF_ABSL_USED_TARGETS
absl::absl_check
absl::absl_log
absl::algorithm
absl::base
absl::bind_front
absl::bits
absl::btree
absl::cleanup
absl::cord
absl::core_headers
absl::debugging
absl::die_if_null
absl::dynamic_annotations
absl::flags
absl::flat_hash_map
absl::flat_hash_set
absl::function_ref
absl::hash
absl::layout
absl::log_initialize
absl::log_severity
absl::memory
absl::node_hash_map
absl::node_hash_set
absl::optional
absl::span
absl::status
absl::statusor
absl::strings
absl::synchronization
absl::time
absl::type_traits
absl::utility
absl::variant
)
if(NOT TARGET protobuf::libprotobuf)
add_library(protobuf::libprotobuf STATIC IMPORTED)
add_dependencies(protobuf::libprotobuf protobuf-${GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION})
set_target_properties(protobuf::libprotobuf PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_CONFIGURATIONS "None;Debug;Release;RelWithDebInfo;MinSizeRel"
MAP_IMPORTED_CONFIG_NOOPTWITHASM Debug
MAP_IMPORTED_CONFIG_COVERAGE Debug
MAP_IMPORTED_CONFIG_O2WITHASM RelWithDebInfo
MAP_IMPORTED_CONFIG_O3WITHASM RelWithDebInfo
MAP_IMPORTED_CONFIG_ASAN Debug
IMPORTED_LOCATION_NONE ${GNSSSDR_BINARY_DIR}/protobuf-${GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION}/${CMAKE_INSTALL_LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}protobuf${CMAKE_STATIC_LIBRARY_SUFFIX}
IMPORTED_LOCATION_DEBUG ${GNSSSDR_BINARY_DIR}/protobuf-${GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION}/${CMAKE_INSTALL_LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}protobufd${CMAKE_STATIC_LIBRARY_SUFFIX}
IMPORTED_LOCATION_RELEASE ${GNSSSDR_BINARY_DIR}/protobuf-${GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION}/${CMAKE_INSTALL_LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}protobuf${CMAKE_STATIC_LIBRARY_SUFFIX}
IMPORTED_LOCATION_RELWITHDEBINFO ${GNSSSDR_BINARY_DIR}/protobuf-${GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION}/${CMAKE_INSTALL_LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}protobuf${CMAKE_STATIC_LIBRARY_SUFFIX}
IMPORTED_LOCATION_MINSIZEREL ${GNSSSDR_BINARY_DIR}/protobuf-${GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION}/${CMAKE_INSTALL_LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}protobuf${CMAKE_STATIC_LIBRARY_SUFFIX}
INTERFACE_INCLUDE_DIRECTORIES ${GNSSSDR_BINARY_DIR}/protobuf-${GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION}/include
INTERFACE_LINK_LIBRARIES "${ZLIB_LIBRARIES_};${CoreFoundation};${UTF8_LIBRARIES};${PROTOBUF_ABSL_USED_TARGETS};${GNSSSDR_BINARY_DIR}/protobuf-${GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION}/${CMAKE_INSTALL_LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}protobuf$<$<CONFIG:Debug>:d>${CMAKE_STATIC_LIBRARY_SUFFIX}"
)
endif()
if(NOT TARGET protobuf::protoc)
add_executable(protobuf::protoc IMPORTED)
add_dependencies(protobuf::protoc protobuf-${GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION})
unset(Protobuf_PROTOC_EXECUTABLE)
set(PROTOBUF_PROTOC_EXECUTABLE "${GNSSSDR_BINARY_DIR}/protobuf-${GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION}/bin/protoc")
set_target_properties(protobuf::protoc PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION ${GNSSSDR_BINARY_DIR}/protobuf-${GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION}/bin/protoc
INTERFACE_LINK_LIBRARIES ${GNSSSDR_BINARY_DIR}/protobuf-${GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION}/${CMAKE_INSTALL_LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}protoc$<$<CONFIG:Debug>:d>${CMAKE_STATIC_LIBRARY_SUFFIX}
)
endif()

View File

@ -1,138 +0,0 @@
# CMAKE_PARSE_ARGUMENTS(<prefix> <options> <one_value_keywords> <multi_value_keywords> args...)
#
# CMAKE_PARSE_ARGUMENTS() is intended to be used in macros or functions for
# parsing the arguments given to that macro or function.
# It processes the arguments and defines a set of variables which hold the
# values of the respective options.
#
# The <options> argument contains all options for the respective macro,
# i.e. keywords which can be used when calling the macro without any value
# following, like e.g. the OPTIONAL keyword of the install() command.
#
# The <one_value_keywords> argument contains all keywords for this macro
# which are followed by one value, like e.g. DESTINATION keyword of the
# install() command.
#
# The <multi_value_keywords> argument contains all keywords for this macro
# which can be followed by more than one value, like e.g. the TARGETS or
# FILES keywords of the install() command.
#
# When done, CMAKE_PARSE_ARGUMENTS() will have defined for each of the
# keywords listed in <options>, <one_value_keywords> and
# <multi_value_keywords> a variable composed of the given <prefix>
# followed by "_" and the name of the respective keyword.
# These variables will then hold the respective value from the argument list.
# For the <options> keywords this will be TRUE or FALSE.
#
# All remaining arguments are collected in a variable
# <prefix>_UNPARSED_ARGUMENTS, this can be checked afterwards to see whether
# your macro was called with unrecognized parameters.
#
# As an example here a my_install() macro, which takes similar arguments as the
# real install() command:
#
# function(MY_INSTALL)
# set(options OPTIONAL FAST)
# set(oneValueArgs DESTINATION RENAME)
# set(multiValueArgs TARGETS CONFIGURATIONS)
# cmake_parse_arguments(MY_INSTALL "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
# ...
#
# Assume my_install() has been called like this:
# my_install(TARGETS foo bar DESTINATION bin OPTIONAL blub)
#
# After the cmake_parse_arguments() call the macro will have set the following
# variables:
# MY_INSTALL_OPTIONAL = TRUE
# MY_INSTALL_FAST = FALSE (this option was not used when calling my_install()
# MY_INSTALL_DESTINATION = "bin"
# MY_INSTALL_RENAME = "" (was not used)
# MY_INSTALL_TARGETS = "foo;bar"
# MY_INSTALL_CONFIGURATIONS = "" (was not used)
# MY_INSTALL_UNPARSED_ARGUMENTS = "blub" (no value expected after "OPTIONAL"
#
# You can the continue and process these variables.
#
# Keywords terminate lists of values, e.g. if directly after a one_value_keyword
# another recognized keyword follows, this is interpreted as the beginning of
# the new option.
# E.g. my_install(TARGETS foo DESTINATION OPTIONAL) would result in
# MY_INSTALL_DESTINATION set to "OPTIONAL", but MY_INSTALL_DESTINATION would
# be empty and MY_INSTALL_OPTIONAL would be set to TRUE therefor.
#=============================================================================
# Copyright 2010 Alexander Neundorf <neundorf@kde.org>
#
# 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.)
if(__CMAKE_PARSE_ARGUMENTS_INCLUDED)
return()
endif()
set(__CMAKE_PARSE_ARGUMENTS_INCLUDED TRUE)
function(CMAKE_PARSE_ARGUMENTS prefix _optionNames _singleArgNames _multiArgNames)
# first set all result variables to empty/FALSE
foreach(arg_name ${_singleArgNames} ${_multiArgNames})
set(${prefix}_${arg_name})
endforeach(arg_name)
foreach(option ${_optionNames})
set(${prefix}_${option} FALSE)
endforeach(option)
set(${prefix}_UNPARSED_ARGUMENTS)
set(insideValues FALSE)
set(currentArgName)
# now iterate over all arguments and fill the result variables
foreach(currentArg ${ARGN})
list(FIND _optionNames "${currentArg}" optionIndex) # ... then this marks the end of the arguments belonging to this keyword
list(FIND _singleArgNames "${currentArg}" singleArgIndex) # ... then this marks the end of the arguments belonging to this keyword
list(FIND _multiArgNames "${currentArg}" multiArgIndex) # ... then this marks the end of the arguments belonging to this keyword
if(${optionIndex} EQUAL -1 AND ${singleArgIndex} EQUAL -1 AND ${multiArgIndex} EQUAL -1)
if(insideValues)
if("${insideValues}" STREQUAL "SINGLE")
set(${prefix}_${currentArgName} ${currentArg})
set(insideValues FALSE)
elseif("${insideValues}" STREQUAL "MULTI")
list(APPEND ${prefix}_${currentArgName} ${currentArg})
endif()
else(insideValues)
list(APPEND ${prefix}_UNPARSED_ARGUMENTS ${currentArg})
endif(insideValues)
else()
if(NOT ${optionIndex} EQUAL -1)
set(${prefix}_${currentArg} TRUE)
set(insideValues FALSE)
elseif(NOT ${singleArgIndex} EQUAL -1)
set(currentArgName ${currentArg})
set(${prefix}_${currentArgName})
set(insideValues "SINGLE")
elseif(NOT ${multiArgIndex} EQUAL -1)
set(currentArgName ${currentArg})
set(${prefix}_${currentArgName})
set(insideValues "MULTI")
endif()
endif()
endforeach(currentArg)
# propagate the result variables to the caller:
foreach(arg_name ${_singleArgNames} ${_multiArgNames} ${_optionNames})
set(${prefix}_${arg_name} ${${prefix}_${arg_name}} PARENT_SCOPE)
endforeach(arg_name)
set(${prefix}_UNPARSED_ARGUMENTS ${${prefix}_UNPARSED_ARGUMENTS} PARENT_SCOPE)
endfunction(CMAKE_PARSE_ARGUMENTS _options _singleArgs _multiArgs)

View File

@ -0,0 +1,109 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
if(CMAKE_VERSION VERSION_LESS 3.19)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(ARCHITECTURE_STRING "(64 bits)")
else()
set(ARCHITECTURE_STRING "(32 bits)")
endif()
else()
set(ARCHITECTURE_STRING "(${CMAKE_HOST_SYSTEM_PROCESSOR})")
endif()
if(EXISTS "/etc/lsb-release")
execute_process(COMMAND cat /etc/lsb-release
COMMAND grep DISTRIB_ID
COMMAND awk -F= "{ print $2 }"
COMMAND tr "\n" " "
COMMAND sed "s/ //"
OUTPUT_VARIABLE LINUX_DISTRIBUTION
RESULT_VARIABLE LINUX_ID_RESULT
)
execute_process(COMMAND cat /etc/lsb-release
COMMAND grep DISTRIB_RELEASE
COMMAND awk -F= "{ print $2 }"
COMMAND tr "\n" " "
COMMAND sed "s/ //"
OUTPUT_VARIABLE LINUX_VER
RESULT_VARIABLE LINUX_VER_RESULT
)
endif()
if(NOT LINUX_DISTRIBUTION)
if(EXISTS "/etc/linuxmint/info")
set(LINUX_DISTRIBUTION "LinuxMint")
execute_process(COMMAND cat /etc/linuxmint/info
COMMAND grep -m1 RELEASE
COMMAND awk -F= "{ print $2 }"
COMMAND tr "\n" " "
COMMAND sed "s/ //"
OUTPUT_VARIABLE LINUX_VER
RESULT_VARIABLE LINUX_VER_RESULT
)
endif()
endif()
if(NOT LINUX_DISTRIBUTION)
if(EXISTS "/etc/os-release")
execute_process(COMMAND cat /etc/os-release
COMMAND grep -m1 NAME
COMMAND awk -F= "{ print $2 }"
COMMAND tr "\n" " "
COMMAND sed "s/ //"
OUTPUT_VARIABLE LINUX_DISTRIBUTION_
RESULT_VARIABLE LINUX_ID_RESULT
)
execute_process(COMMAND cat /etc/os-release
COMMAND grep VERSION_ID
COMMAND awk -F= "{ print $2 }"
COMMAND tr "\n" " "
COMMAND sed "s/ //"
OUTPUT_VARIABLE LINUX_VER_
RESULT_VARIABLE LINUX_VER_RESULT
)
if(LINUX_DISTRIBUTION_)
string(REPLACE "\"" "" LINUX_DISTRIBUTION__ ${LINUX_DISTRIBUTION_})
string(STRIP ${LINUX_DISTRIBUTION__} LINUX_DISTRIBUTION)
endif()
if(LINUX_VER_)
string(REPLACE "\"" "" LINUX_VER ${LINUX_VER_})
endif()
if(${LINUX_DISTRIBUTION} MATCHES "Debian")
set(LINUX_DISTRIBUTION "Debian")
file(READ /etc/debian_version LINUX_VER_)
string(REPLACE "\n" "" LINUX_VER ${LINUX_VER_})
endif()
endif()
endif()
if(NOT LINUX_DISTRIBUTION)
if(EXISTS "/etc/redhat-release")
set(LINUX_DISTRIBUTION "Red Hat")
file(READ /etc/redhat-release LINUX_VER_)
string(REPLACE "\n" "" LINUX_VER ${LINUX_VER_})
endif()
endif()
if(NOT LINUX_DISTRIBUTION)
if(EXISTS "/etc/debian_version")
set(LINUX_DISTRIBUTION "Debian")
file(READ /etc/debian_version LINUX_VER_)
string(REPLACE "\n" "" LINUX_VER ${LINUX_VER_})
endif()
endif()
if(NOT LINUX_DISTRIBUTION)
if(EXISTS "/etc/arch-release")
set(LINUX_DISTRIBUTION "Arch Linux")
set(LINUX_VER "")
endif()
endif()
if(NOT LINUX_DISTRIBUTION)
set(LINUX_DISTRIBUTION "Generic")
set(LINUX_VER "Unknown")
endif()

View File

@ -0,0 +1,79 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
execute_process(COMMAND uname -v OUTPUT_VARIABLE DARWIN_VERSION)
string(REGEX MATCH "[0-9]+" DARWIN_VERSION ${DARWIN_VERSION})
if(${DARWIN_VERSION} VERSION_GREATER "19")
execute_process(COMMAND awk "/SOFTWARE LICENSE AGREEMENT FOR macOS/" "/System/Library/CoreServices/Setup Assistant.app/Contents/Resources/en.lproj/OSXSoftwareLicense.rtf" OUTPUT_VARIABLE macOS_NAME)
if(macOS_NAME)
string(REGEX MATCH "macOS*([^\n\r]*)" macOS_NAME ${macOS_NAME})
string(REGEX REPLACE "macOS " "" macOS_NAME ${macOS_NAME})
string(REGEX REPLACE ".$" "" macOS_NAME ${macOS_NAME})
execute_process(COMMAND sw_vers -productVersion OUTPUT_VARIABLE macOS_VERSION)
string(REGEX REPLACE "\n$" "" macOS_VERSION ${macOS_VERSION})
set(MACOS_DISTRIBUTION "macOS ${macOS_NAME} ${macOS_VERSION} (${CMAKE_SYSTEM_PROCESSOR})")
endif()
endif()
if(${DARWIN_VERSION} MATCHES "19")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++17")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
set(MACOS_DISTRIBUTION "macOS Catalina 10.15")
endif()
if(${DARWIN_VERSION} MATCHES "18")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++14")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
set(MACOS_DISTRIBUTION "macOS Mojave 10.14")
endif()
if(${DARWIN_VERSION} MATCHES "17")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++14")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
set(MACOS_DISTRIBUTION "macOS High Sierra 10.13")
endif()
if(${DARWIN_VERSION} MATCHES "16")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++14")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
set(MACOS_DISTRIBUTION "macOS Sierra 10.12")
endif()
if(${DARWIN_VERSION} MATCHES "15")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
set(MACOS_DISTRIBUTION "Mac OS X 10.11 El Capitan")
endif()
if(${DARWIN_VERSION} MATCHES "14")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
set(MACOS_DISTRIBUTION "Mac OS X 10.10 Yosemite")
endif()
if(${DARWIN_VERSION} MATCHES "13")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION="com.apple.compilers.llvm.clang.1_0")
set(MACOS_DISTRIBUTION "Mac OS X 10.9 Mavericks")
endif()
if(${DARWIN_VERSION} MATCHES "12")
set(MACOS_DISTRIBUTION "Mac OS X 10.8 Mountain Lion")
endif()
if(${DARWIN_VERSION} MATCHES "11")
set(MACOS_DISTRIBUTION "Mac OS X 10.7 Lion")
endif()
if(${DARWIN_VERSION} MATCHES "10")
set(MACOS_DISTRIBUTION "Mac OS X 10.6 Snow Leopard")
endif()
if(NOT MACOS_DISTRIBUTION)
set(MACOS_DISTRIBUTION "macOS (Unknown version)")
endif()

View File

@ -0,0 +1,67 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2021 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
set(FPHSA_NAME_MISMATCHED ON)
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
find_library(CPUFEATURES_LIBRARIES
NAMES cpu_features
PATHS ${GNSSSDR_LIB_PATHS}
)
find_path(CPUFEATURES_INCLUDE_DIR cpu_features_macros.h
PATHS $ENV{CPUFEATURES_DIR}/include
$ENV{CPUFEATURES_DIR}
/usr/include
/usr/local/include
~/Library/Frameworks
/Library/Frameworks
/sw/include # Fink
/opt/local/include # MacPorts
/opt/csw/include # Blastwave
PATH_SUFFIXES cpu_features
)
if(CPUFEATURES_INCLUDE_DIR AND CPUFEATURES_LIBRARIES)
if(NOT PACKAGE_VERSION)
set(PACKAGE_VERSION "")
endif()
set(OLD_PACKAGE_VERSION ${PACKAGE_VERSION})
unset(PACKAGE_VERSION)
list(GET CPUFEATURES_LIBRARIES 0 FIRST_DIR)
get_filename_component(CPUFEATURES_LIBRARIES_PATH ${FIRST_DIR} DIRECTORY)
if(EXISTS ${CPUFEATURES_LIBRARIES_PATH}/cmake/CpuFeatures/CpuFeaturesConfigVersion.cmake)
include(${CPUFEATURES_LIBRARIES_PATH}/cmake/CpuFeatures/CpuFeaturesConfigVersion.cmake)
endif()
if(PACKAGE_VERSION)
set(CPUFEATURES_VERSION ${PACKAGE_VERSION})
else()
set(CPUFEATURES_VERSION "Unknown")
endif()
set(PACKAGE_VERSION ${OLD_PACKAGE_VERSION})
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(CPUFEATURES
DEFAULT_MSG
CPUFEATURES_LIBRARIES
CPUFEATURES_INCLUDE_DIR
)
if(CPUFEATURES_FOUND AND NOT TARGET CpuFeature::cpu_features)
add_library(CpuFeature::cpu_features STATIC IMPORTED)
set_target_properties(CpuFeature::cpu_features PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${CPUFEATURES_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${CPUFEATURES_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${CPUFEATURES_LIBRARIES}"
)
endif()
mark_as_advanced(CPUFEATURES_LIBRARIES)

View File

@ -0,0 +1,265 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
# Original code from https://github.com/vector-of-bool/CMakeCM and modified
# by C. Fernandez. The original code is distributed under the OSI-approved
# BSD 3-Clause License. See https://cmake.org/licensing for details.
#[=======================================================================[.rst:
FindFILESYSTEM
##############
This module supports the C++17 standard library's filesystem utilities. Use the
:imp-target:`std::filesystem` imported target to
Options
*******
The ``COMPONENTS`` argument to this module supports the following values:
.. find-component:: Experimental
:name: fs.Experimental
Allows the module to find the "experimental" Filesystem TS version of the
Filesystem library. This is the library that should be used with the
``std::experimental::filesystem`` namespace.
.. find-component:: Final
:name: fs.Final
Finds the final C++17 standard version of the filesystem library.
If no components are provided, behaves as if the
:find-component:`fs.Final` component was specified.
If both :find-component:`fs.Experimental` and :find-component:`fs.Final` are
provided, first looks for ``Final``, and falls back to ``Experimental`` in case
of failure. If ``Final`` is found, :imp-target:`std::filesystem` and all
:ref:`variables <fs.variables>` will refer to the ``Final`` version.
Imported Targets
****************
.. imp-target:: std::filesystem
The ``std::filesystem`` imported target is defined when any requested
version of the C++ filesystem library has been found, whether it is
*Experimental* or *Final*.
If no version of the filesystem library is available, this target will not
be defined.
.. note::
This target has ``cxx_std_17`` as an ``INTERFACE``
:ref:`compile language standard feature <req-lang-standards>`. Linking
to this target will automatically enable C++17 if no later standard
version is already required on the linking target.
.. _fs.variables:
Variables
*********
.. variable:: CXX_FILESYSTEM_IS_EXPERIMENTAL
Set to ``TRUE`` when the :find-component:`fs.Experimental` version of C++
filesystem library was found, otherwise ``FALSE``.
.. variable:: CXX_FILESYSTEM_HAVE_FS
Set to ``TRUE`` when a filesystem header was found.
.. variable:: CXX_FILESYSTEM_HEADER
Set to either ``filesystem`` or ``experimental/filesystem`` depending on
whether :find-component:`fs.Final` or :find-component:`fs.Experimental` was
found.
.. variable:: CXX_FILESYSTEM_NAMESPACE
Set to either ``std::filesystem`` or ``std::experimental::filesystem``
depending on whether :find-component:`fs.Final` or
:find-component:`fs.Experimental` was found.
Examples
********
Using `find_package(FILESYSTEM)` with no component arguments:
.. code-block:: cmake
find_package(FILESYSTEM REQUIRED)
add_executable(my-program main.cpp)
target_link_libraries(my-program PRIVATE std::filesystem)
#]=======================================================================]
if(TARGET std::filesystem)
# This module has already been processed. Don't do it again.
return()
endif()
include(CMakePushCheckState)
include(CheckIncludeFileCXX)
include(CheckCXXSourceCompiles)
cmake_push_check_state()
if(FILESYSTEM_FIND_QUIETLY)
set(CMAKE_REQUIRED_QUIET ${FILESYSTEM_FIND_QUIETLY})
endif()
# All of our tests require C++17 or later
set(OLD_CMAKE_CXX_STANDARD ${CMAKE_CXX_STANDARD})
set(CMAKE_CXX_STANDARD 17)
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "8.0.0"))
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.99")
set(UNDEFINED_BEHAVIOR_WITHOUT_LINKING TRUE)
endif()
set(CMAKE_REQUIRED_FLAGS "-std=c++17")
endif()
if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.99"))
set(CMAKE_REQUIRED_FLAGS "-std=c++17")
endif()
if((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "11"))
set(CMAKE_REQUIRED_FLAGS "-std=c++17")
endif()
if(MSVC AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "18"))
set(CMAKE_REQUIRED_FLAGS "/std:c++17")
endif()
# Normalize and check the component list we were given
set(want_components ${FILESYSTEM_FIND_COMPONENTS})
if(FILESYSTEM_FIND_COMPONENTS STREQUAL "")
set(want_components Final)
endif()
# Warn on any unrecognized components
set(extra_components ${want_components})
list(REMOVE_ITEM extra_components Final Experimental)
foreach(component IN LISTS extra_components)
message(WARNING "Extraneous find_package component for FILESYSTEM: ${component}")
endforeach()
# Detect which of Experimental and Final we should look for
set(find_experimental TRUE)
set(find_final TRUE)
if(NOT "Final" IN_LIST want_components)
set(find_final FALSE)
endif()
if(NOT "Experimental" IN_LIST want_components)
set(find_experimental FALSE)
endif()
if(find_final)
check_include_file_cxx("filesystem" _CXX_FILESYSTEM_HAVE_HEADER)
mark_as_advanced(_CXX_FILESYSTEM_HAVE_HEADER)
if(_CXX_FILESYSTEM_HAVE_HEADER)
# We found the non-experimental header. Don't bother looking for the
# experimental one.
set(find_experimental FALSE)
endif()
else()
set(_CXX_FILESYSTEM_HAVE_HEADER FALSE)
endif()
if(find_experimental)
check_include_file_cxx("experimental/filesystem" _CXX_FILESYSTEM_HAVE_EXPERIMENTAL_HEADER)
mark_as_advanced(_CXX_FILESYSTEM_HAVE_EXPERIMENTAL_HEADER)
else()
set(_CXX_FILESYSTEM_HAVE_EXPERIMENTAL_HEADER FALSE)
endif()
if(_CXX_FILESYSTEM_HAVE_HEADER)
set(_have_fs TRUE)
set(_fs_header filesystem)
set(_fs_namespace std::filesystem)
elseif(_CXX_FILESYSTEM_HAVE_EXPERIMENTAL_HEADER)
set(_have_fs TRUE)
set(_fs_header experimental/filesystem)
set(_fs_namespace std::experimental::filesystem)
else()
set(_have_fs FALSE)
endif()
set(CXX_FILESYSTEM_HAVE_FS ${_have_fs} CACHE BOOL "TRUE if we have the C++ filesystem headers")
set(CXX_FILESYSTEM_HEADER ${_fs_header} CACHE STRING "The header that should be included to obtain the filesystem APIs")
set(CXX_FILESYSTEM_NAMESPACE ${_fs_namespace} CACHE STRING "The C++ namespace that contains the filesystem APIs")
set(_found FALSE)
if(CXX_FILESYSTEM_HAVE_FS)
# We have some filesystem library available. Do link checks
string(CONFIGURE [[
#include <@CXX_FILESYSTEM_HEADER@>
int main() {
auto cwd = @CXX_FILESYSTEM_NAMESPACE@::current_path();
return static_cast<int>(cwd.string().size());
}
]] code @ONLY)
# Try to compile a simple filesystem program without any linker flags
if(NOT UNDEFINED_BEHAVIOR_WITHOUT_LINKING)
check_cxx_source_compiles("${code}" CXX_FILESYSTEM_NO_LINK_NEEDED)
set(can_link ${CXX_FILESYSTEM_NO_LINK_NEEDED})
endif()
if(NOT CXX_FILESYSTEM_NO_LINK_NEEDED)
set(prev_libraries ${CMAKE_REQUIRED_LIBRARIES})
set(CMAKE_REQUIRED_FLAGS "-std=c++17")
# Add the libstdc++ flag
set(CMAKE_REQUIRED_LIBRARIES ${prev_libraries} -lstdc++fs)
check_cxx_source_compiles("${code}" CXX_FILESYSTEM_STDCPPFS_NEEDED)
set(can_link ${CXX_FILESYSTEM_STDCPPFS_NEEDED})
if(NOT CXX_FILESYSTEM_STDCPPFS_NEEDED)
# Try the libc++ flag
set(CMAKE_REQUIRED_LIBRARIES ${prev_libraries} -lc++fs)
check_cxx_source_compiles("${code}" CXX_FILESYSTEM_CPPFS_NEEDED)
set(can_link ${CXX_FILESYSTEM_CPPFS_NEEDED})
endif()
endif()
if(can_link)
if(CMAKE_VERSION VERSION_LESS 3.12)
add_library(std::filesystem INTERFACE IMPORTED GLOBAL)
else()
add_library(std::filesystem INTERFACE IMPORTED)
target_compile_features(std::filesystem INTERFACE cxx_std_17)
endif()
set(_found TRUE)
if(CXX_FILESYSTEM_NO_LINK_NEEDED)
# Nothing to add...
elseif(CXX_FILESYSTEM_STDCPPFS_NEEDED)
target_link_libraries(std::filesystem INTERFACE -lstdc++fs)
elseif(CXX_FILESYSTEM_CPPFS_NEEDED)
target_link_libraries(std::filesystem INTERFACE -lc++fs)
endif()
endif()
endif()
if(NOT ${_found})
set(CMAKE_CXX_STANDARD ${OLD_CMAKE_CXX_STANDARD})
endif()
cmake_pop_check_state()
set(FILESYSTEM_FOUND ${_found})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(FILESYSTEM DEFAULT_MSG FILESYSTEM_FOUND)
if(FILESYSTEM_FIND_REQUIRED AND NOT FILESYSTEM_FOUND)
message(FATAL_ERROR "Cannot compile a simple program using std::filesystem")
endif()

View File

@ -0,0 +1,151 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
# - Try to find GFlags
#
# The following CMake and environment variables are optionally searched
# for defaults:
# GFLAGS_ROOT: Base directory where all GFlags components are found
#
# The following are set after configuration is done:
# GFlags_FOUND
# GFlags_INCLUDE_DIRS
# GFlags_LIBS
# GFlags_LIBRARY_DIRS
#
# Provides the following imported target:
# Gflags::gflags
#
if(NOT COMMAND feature_summary)
include(FeatureSummary)
endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
if(NOT GFLAGS_ROOT)
set(GFLAGS_ROOT_USER_PROVIDED /usr/local)
else()
set(GFLAGS_ROOT_USER_PROVIDED ${GFLAGS_ROOT})
endif()
if(DEFINED ENV{GFLAGS_ROOT})
set(GFLAGS_ROOT_USER_PROVIDED
${GFLAGS_ROOT_USER_PROVIDED}
$ENV{GFLAGS_ROOT}
)
endif()
if(APPLE)
find_path(GFlags_ROOT_DIR
libgflags.dylib
PATHS
${GFLAGS_ROOT_USER_PROVIDED}/lib
/usr/local/lib
/opt/local/lib
/opt/homebrew/opt/gflags/lib
)
else()
find_path(GFlags_ROOT_DIR
libgflags.so
PATHS
${GFLAGS_ROOT_USER_PROVIDED}/lib
${GFLAGS_ROOT_USER_PROVIDED}/lib64
${GNSSSDR_LIB_PATHS}
)
endif()
if(GFlags_ROOT_DIR)
unset(GFlags_INCLUDE_DIRS CACHE)
# We are testing only a couple of files in the include directories
find_path(GFlags_INCLUDE_DIRS
gflags/gflags.h
PATHS
${GFlags_ROOT_DIR}/src
${GFLAGS_ROOT_USER_PROVIDED}/include
/usr/include
/usr/local/include
/opt/local/include
/opt/homebrew/opt/gflags/include
)
# Find the libraries
set(GFlags_LIBRARY_DIRS ${GFlags_ROOT_DIR})
find_library(GFlags_lib gflags ${GFlags_LIBRARY_DIRS})
if(EXISTS ${GFlags_INCLUDE_DIRS}/gflags/gflags_gflags.h)
set(GFLAGS_GREATER_20 TRUE)
else()
set(GFLAGS_GREATER_20 FALSE)
endif()
message(STATUS "gflags library found at ${GFlags_lib}")
set(GFlags_LIBS ${GFlags_lib})
set(GFlags_FOUND true)
mark_as_advanced(GFlags_INCLUDE_DIRS)
else()
message(STATUS "Cannot find gflags")
set(GFlags_FOUND false)
endif()
if(GFlags_LIBS AND GFlags_INCLUDE_DIRS)
if(NOT PACKAGE_VERSION)
set(PACKAGE_VERSION "")
endif()
set(OLD_PACKAGE_VERSION ${PACKAGE_VERSION})
unset(PACKAGE_VERSION)
list(GET GFlags_LIBS 0 FIRST_DIR)
get_filename_component(GFlags_LIBS_DIR ${FIRST_DIR} DIRECTORY)
if(EXISTS ${GFlags_LIBS_DIR}/cmake/gflags/gflags-config-version.cmake)
include(${GFlags_LIBS_DIR}/cmake/gflags/gflags-config-version.cmake)
endif()
if(NOT PACKAGE_VERSION)
if(EXISTS ${GFlags_INCLUDE_DIRS}/google/gflags.h)
set(PACKAGE_VERSION "2.0")
endif()
endif()
if(PACKAGE_VERSION)
set(GFLAGS_VERSION ${PACKAGE_VERSION})
set_package_properties(GFLAGS PROPERTIES
DESCRIPTION "C++ library that implements commandline flags processing (found: v${GFLAGS_VERSION})"
)
else()
set_package_properties(GFLAGS PROPERTIES
DESCRIPTION "C++ library that implements commandline flags processing"
)
endif()
set(PACKAGE_VERSION ${OLD_PACKAGE_VERSION})
else()
set_package_properties(GFLAGS PROPERTIES
DESCRIPTION "C++ library that implements commandline flags processing"
)
endif()
set_package_properties(GFLAGS PROPERTIES
URL "https://github.com/gflags/gflags"
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GFLAGS DEFAULT_MSG GFlags_LIBS GFlags_INCLUDE_DIRS)
if(GFLAGS_VERSION)
if(${GFLAGS_VERSION} VERSION_LESS "${GNSSSDR_GFLAGS_MIN_VERSION}")
set(GFLAGS_FOUND FALSE)
unset(GFlags_LIBS CACHE)
unset(GFlags_INCLUDE_DIRS CACHE)
endif()
endif()
if(GFLAGS_FOUND AND NOT TARGET Gflags::gflags)
add_library(Gflags::gflags SHARED IMPORTED)
set_target_properties(Gflags::gflags PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${GFlags_LIBS}"
INTERFACE_INCLUDE_DIRECTORIES "${GFlags_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${GFlags_LIBS}"
)
endif()

View File

@ -0,0 +1,88 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
if(NOT COMMAND feature_summary)
include(FeatureSummary)
endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
if(NOT GFORTRAN_ROOT)
set(GFORTRAN_ROOT_USER_DEFINED /usr/lib)
else()
set(GFORTRAN_ROOT_USER_DEFINED ${GFORTRAN_ROOT})
endif()
if(DEFINED ENV{GFORTRAN_ROOT})
set(GFORTRAN_ROOT_USER_DEFINED
$ENV{GFORTRAN_ROOT}
${GFORTRAN_ROOT_USER_DEFINED}
)
endif()
set(GCC_MAJOR_SERIES 15 14 13 12 11 10 9 8 7 6 5)
set(GCC4_SERIES 4.9.1 4.9 4.8.3 4.8.1 4.7.2 4.7 4.8.2 4.8 4.7 4.6 4.5 4.4.4 4.4)
set(GCC_SERIES ${GCC_MAJOR_SERIES} ${GCC4_SERIES})
find_library(GFORTRAN NAMES gfortran
PATHS ${GFORTRAN_ROOT_USER_DEFINED}
/usr/lib/gcc/x86_64-linux-gnu # Debian
/usr/lib/gcc/i386-linux-gnu
/usr/lib/gcc/i486-linux-gnu
/usr/lib/gcc/i586-linux-gnu
/usr/lib/gcc/i686-linux-gnu
/usr/lib/gcc/arm-linux-gnueabihf
/usr/lib/gcc/aarch64-linux-gnu
/usr/lib/gcc/arm-linux-gnueabi
/usr/lib/gcc/alpha-linux-gnu
/usr/lib/gcc/riscv64-linux-gnu
/usr/lib/gcc/hppa-linux-gnu
/usr/lib/gcc/m68k-linux-gnu
/usr/lib/gcc/i686-gnu
/usr/lib/gcc/x86_64-kfreebsd-gnu
/usr/lib/gcc/i686-kfreebsd-gnu
/usr/lib/gcc/mips-linux-gnu
/usr/lib/gcc/mips64el-linux-gnuabi64
/usr/lib/gcc/mipsel-linux-gnu
/usr/lib/gcc/powerpc-linux-gnu
/usr/lib/gcc/powerpc-linux-gnuspe
/usr/lib/gcc/powerpc64-linux-gnu
/usr/lib/gcc/powerpc64le-linux-gnu
/usr/lib/gcc/s390x-linux-gnu
/usr/lib/gcc/sparc64-linux-gnu
/usr/lib/gcc/x86_64-linux-gnux32
/usr/lib/gcc/sh4-linux-gnu
/usr/lib/gcc/i686-redhat-linux # Fedora
/usr/lib64/gcc/x86_64-redhat-linux
/usr/lib/gcc/x86_64-redhat-linux
/usr/lib/gcc/armv7hl-redhat-linux-gnueabi
/usr/lib/gcc/aarch64-redhat-linux
/usr/lib/gcc/ppc64le-redhat-linux
/usr/lib/gcc/s390x-redhat-linux
/usr/lib64/gcc/x86_64-suse-linux # openSUSE
/usr/lib/gcc/i586-suse-linux
/usr/lib/gcc/x86_64-suse-linux
/usr/lib/gcc/armv6hl-suse-linux-gnueabi
/usr/lib/gcc/armv7hl-suse-linux-gnueabi
/usr/lib/gcc/loongarch64-linux-gnu
/usr/lib64/gcc/aarch64-suse-linux
/usr/lib64/gcc/powerpc64-suse-linux
/usr/lib64/gcc/powerpc64le-suse-linux
/usr/lib64/gcc/riscv64-suse-linux
/usr/lib64/gcc/s390x-suse-linux
${GNSSSDR_LIB_PATHS}
PATH_SUFFIXES
${GCC_SERIES}
)
set_package_properties(GFORTRAN PROPERTIES
URL "https://gcc.gnu.org/fortran/"
DESCRIPTION "GNU Fortran library"
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GFORTRAN DEFAULT_MSG GFORTRAN)

View File

@ -1,71 +0,0 @@
# - Try to find GFlags
#
# The following variables are optionally searched for defaults
# GFlags_ROOT_DIR: Base directory where all GFlags components are found
#
# The following are set after configuration is done:
# GFlags_FOUND
# GFlags_INCLUDE_DIRS
# GFlags_LIBS
# GFlags_LIBRARY_DIRS
# - Try to find GFlags
#
#
# The following are set after configuration is done:
# GFlags_FOUND
# GFlags_INCLUDE_DIRS
# GFlags_LIBS
# GFlags_LIBRARY_DIRS
cmake_minimum_required(VERSION 2.6)
if(APPLE)
FIND_PATH(GFlags_ROOT_DIR
libgflags.dylib
PATHS
/opt/local/lib
/usr/local/lib
)
else(APPLE)
FIND_PATH(GFlags_ROOT_DIR
libgflags.so
HINTS
/usr/local/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/i386-linux-gnu
/usr/lib/arm-linux-gnueabihf
/usr/lib/arm-linux-gnueabi
/usr/lib/aarch64-linux-gnu
/usr/lib64
/usr/lib
)
endif(APPLE)
IF(GFlags_ROOT_DIR)
# We are testing only a couple of files in the include directories
FIND_PATH(GFlags_INCLUDE_DIRS
gflags/gflags.h
HINTS
/opt/local/include
/usr/local/include
/usr/include
${GFlags_ROOT_DIR}/src
)
# Find the libraries
SET(GFlags_LIBRARY_DIRS ${GFlags_ROOT_DIR})
FIND_LIBRARY(GFlags_lib gflags ${GFlags_LIBRARY_DIRS})
# set up include and link directory
include_directories(${GFlags_INCLUDE_DIRS})
link_directories(${GFlags_LIBRARY_DIRS})
message(STATUS "gflags library found at ${GFlags_lib}")
SET(GFlags_LIBS ${GFlags_lib})
SET(GFlags_FOUND true)
MARK_AS_ADVANCED(GFlags_INCLUDE_DIRS)
ELSE(GFlags_ROOT_DIR)
MESSAGE(STATUS "Cannot find gflags")
SET(GFlags_FOUND false)
ENDIF(GFlags_ROOT_DIR)

View File

@ -1,3 +1,9 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
# - Try to find the Google Glog library
#
# This module defines the following variables
@ -10,90 +16,146 @@
#
# GLOG_ROOT - Can be set to Glog install path or Windows build path
#
# Provides the following imported target:
# Glog::glog
#
if (NOT DEFINED GLOG_ROOT)
set (GLOG_ROOT /usr /usr/local)
endif (NOT DEFINED GLOG_ROOT)
if(NOT COMMAND feature_summary)
include(FeatureSummary)
endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig)
endif()
if(NOT DEFINED GLOG_ROOT)
set(GLOG_ROOT /usr /usr/local)
endif()
if(MSVC)
set(LIB_PATHS ${GLOG_ROOT} ${GLOG_ROOT}/Release)
else(MSVC)
set (LIB_PATHS ${GLOG_ROOT} ${GLOG_ROOT}/lib)
endif(MSVC)
set(LIB_PATHS ${GLOG_ROOT} ${GLOG_ROOT}/Release)
else()
set(LIB_PATHS ${GLOG_ROOT} ${GLOG_ROOT}/lib)
endif()
pkg_check_modules(PC_GLOG libglog)
macro(_FIND_GLOG_LIBRARIES _var)
find_library(${_var}
NAMES ${ARGN}
PATHS ${LIB_PATHS} /opt/local/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/i386-linux-gnu
/usr/lib/arm-linux-gnueabihf
/usr/lib/arm-linux-gnueabi
/usr/lib/aarch64-linux-gnu
find_library(${_var}
NAMES ${ARGN}
HINTS ${PC_GLOG_LIBDIR}
PATHS ${LIB_PATHS}
${GNSSSDR_LIB_PATHS}
${GLOG_ROOT}/lib
$ENV{GLOG_ROOT}/lib
${GLOG_ROOT}/lib64
$ENV{GLOG_ROOT}/lib64
PATH_SUFFIXES lib
)
mark_as_advanced(${_var})
mark_as_advanced(${_var})
endmacro()
macro(_GLOG_APPEND_LIBRARIES _list _release)
set(_debug ${_release}_DEBUG)
if(${_debug})
set(${_list} ${${_list}} optimized ${${_release}} debug ${${_debug}})
set(${_list} ${${_list}} optimized ${${_release}} debug ${${_debug}})
else()
set(${_list} ${${_list}} ${${_release}})
set(${_list} ${${_list}} ${${_release}})
endif()
endmacro()
if(MSVC)
find_path(GLOG_INCLUDE_DIR NAMES raw_logging.h
PATHS
${GLOG_ROOT}/src/windows
${GLOG_ROOT}/src/windows/glog
)
else(MSVC)
# Linux/OS X builds
find_path(GLOG_INCLUDE_DIR NAMES raw_logging.h
PATHS
${GLOG_ROOT}/include/glog
/usr/include/glog
/opt/local/include/glog # default location in Macports
)
endif(MSVC)
find_path(GLOG_INCLUDE_DIR NAMES raw_logging.h
HINTS
${PC_GLOG_INCLUDEDIR}
PATHS
${GLOG_ROOT}/src/windows
${GLOG_ROOT}/src/windows/glog
)
else()
# Linux/OS X builds
find_path(GLOG_INCLUDE_DIR NAMES raw_logging.h
HINTS
${PC_GLOG_INCLUDEDIR}
PATHS
/usr/include/glog
/usr/local/include/glog
/opt/local/include/glog # default location in Macports
/opt/homebrew/opt/glog/include/glog
${GLOG_ROOT}/include/glog
)
endif()
# Find the libraries
if(MSVC)
_FIND_GLOG_LIBRARIES(GLOG_LIBRARIES libglog.lib)
else(MSVC)
# Linux/OS X builds
if(UNIX)
_FIND_GLOG_LIBRARIES(GLOG_LIBRARIES libglog.so)
endif(UNIX)
if(APPLE)
_FIND_GLOG_LIBRARIES(GLOG_LIBRARIES libglog.dylib)
endif(APPLE)
endif(MSVC)
if(GLOG_FOUND)
message(STATUS "glog library found at ${GLOG_LIBRARIES}")
_find_glog_libraries(GLOG_LIBRARIES libglog.lib)
else()
# Linux/OS X builds
if(UNIX)
_find_glog_libraries(GLOG_LIBRARIES libglog.so)
endif()
if(APPLE)
_find_glog_libraries(GLOG_LIBRARIES glog)
endif()
endif()
# handle the QUIETLY and REQUIRED arguments and set GLOG_FOUND to TRUE if
# all listed variables are TRUE
include("${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Glog DEFAULT_MSG
GLOG_LIBRARIES)
if(MSVC)
string(REGEX REPLACE "/glog$" "" VAR_WITHOUT ${GLOG_INCLUDE_DIR})
string(REGEX REPLACE "/windows$" "" VAR_WITHOUT ${VAR_WITHOUT})
set(GLOG_INCLUDE_DIRS ${GLOG_INCLUDE_DIRS} "${VAR_WITHOUT}")
string(REGEX REPLACE "/libglog.lib" "" GLOG_LIBRARIES_DIR ${GLOG_LIBRARIES})
else(MSVC)
# Linux/OS X builds
set(GLOG_INCLUDE_DIRS ${GLOG_INCLUDE_DIR})
string(REGEX REPLACE "/libglog.so" "" GLOG_LIBRARIES_DIR ${GLOG_LIBRARIES})
endif(MSVC)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GLOG DEFAULT_MSG GLOG_LIBRARIES)
if(GLOG_FOUND)
# _GLOG_APPEND_LIBRARIES(GLOG GLOG_LIBRARIES)
message(STATUS "glog library found at ${GLOG_LIBRARIES}")
if(PC_GLOG_VERSION)
set(GLOG_VERSION ${PC_GLOG_VERSION})
endif()
endif()
if(MSVC)
string(REGEX REPLACE "/glog$" "" VAR_WITHOUT ${GLOG_INCLUDE_DIR})
string(REGEX REPLACE "/windows$" "" VAR_WITHOUT ${VAR_WITHOUT})
set(GLOG_INCLUDE_DIRS ${GLOG_INCLUDE_DIRS} "${VAR_WITHOUT}")
string(REGEX REPLACE "/libglog.lib" "" GLOG_LIBRARIES_DIR ${GLOG_LIBRARIES})
else()
# Linux/OS X builds
set(GLOG_INCLUDE_DIRS ${GLOG_INCLUDE_DIR})
string(REGEX REPLACE "/libglog.so" "" GLOG_LIBRARIES_DIR ${GLOG_LIBRARIES})
endif()
if(GLOG_FOUND AND GLOG_VERSION)
set_package_properties(GLOG PROPERTIES
DESCRIPTION "C++ implementation of the Google logging module (found: v${GLOG_VERSION})"
)
else()
set_package_properties(GLOG PROPERTIES
DESCRIPTION "C++ implementation of the Google logging module"
)
endif()
set_package_properties(GLOG PROPERTIES
URL "https://github.com/google/glog"
)
string(REGEX MATCH libglog.a GLOG_IS_STATIC ${GLOG_LIBRARIES})
if(GLOG_FOUND AND NOT TARGET Glog::glog)
if(GLOG_IS_STATIC)
add_library(Glog::glog STATIC IMPORTED)
else()
add_library(Glog::glog SHARED IMPORTED)
endif()
set_target_properties(Glog::glog PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${GLOG_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${GLOG_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${GLOG_LIBRARIES}"
)
endif()
# Fix for glog 0.7.0
if(EXISTS ${GLOG_INCLUDE_DIRS}/export.h)
set_target_properties(Glog::glog PROPERTIES INTERFACE_COMPILE_DEFINITIONS "GLOG_USE_GLOG_EXPORT")
endif()

View File

@ -0,0 +1,79 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2024 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
if(NOT COMMAND feature_summary)
include(FeatureSummary)
endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig)
endif()
pkg_check_modules(PC_GMP "gmp")
set(GMP_DEFINITIONS ${PC_GMP_CFLAGS_OTHER})
find_path(GMP_INCLUDE_DIR
NAMES gmpxx.h
HINTS ${PC_GMP_INCLUDEDIR}
PATHS ${CMAKE_INSTALL_PREFIX}/include
/usr/local/include
/usr/include
/opt/local/include
)
set(GMP_INCLUDE_DIRS ${GMP_INCLUDE_DIR})
set(GMP_PC_ADD_CFLAGS "-I${GMP_INCLUDE_DIR}")
find_library(GMPXX_LIBRARY
NAMES gmpxx
HINTS ${PC_GMP_LIBDIR}
PATHS ${GNSSSDR_LIB_PATHS}
${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
)
find_library(GMP_LIBRARY
NAMES gmp
HINTS ${PC_GMP_LIBDIR}
PATHS ${GNSSSDR_LIB_PATHS}
${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
)
set(GMP_LIBRARIES ${GMPXX_LIBRARY} ${GMP_LIBRARY})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GMP DEFAULT_MSG GMPXX_LIBRARY GMP_LIBRARY GMP_INCLUDE_DIR)
if(GMP_FOUND AND NOT TARGET Gmp::gmp)
add_library(Gmp::gmp SHARED IMPORTED)
set_target_properties(Gmp::gmp PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${GMPXX_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${GMP_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${GMP_LIBRARIES}"
)
endif()
set_package_properties(GMP PROPERTIES
URL "https://gmplib.org/"
)
if(PC_GMP_VERSION)
set_package_properties(GMP PROPERTIES
DESCRIPTION "The GNU Multiple Precision Arithmetic Library (found: v.${PC_GMP_VERSION})"
)
else()
set_package_properties(GMP PROPERTIES
DESCRIPTION "The GNU Multiple Precision Arithmetic Library"
)
endif()
mark_as_advanced(GMPXX_LIBRARY GMP_LIBRARY GMP_INCLUDE_DIR)

View File

@ -0,0 +1,43 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2021 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
if(GNSSSIMULATOR_ROOT)
set(GNSSSIMULATOR_ROOT_USER_DEFINED ${GNSSSIMULATOR_ROOT})
else()
set(GNSSSIMULATOR_ROOT_USER_DEFINED /usr/local/bin)
endif()
if(DEFINED ENV{GNSSSIMULATOR_ROOT})
set(GNSSSIMULATOR_ROOT_USER_DEFINED
${GNSSSIMULATOR_ROOT_USER_DEFINED}
$ENV{GNSSSIMULATOR}
)
endif()
set(GNSSSIMULATOR_ROOT_USER_DEFINED
${GNSSSIMULATOR_ROOT_USER_DEFINED}
${CMAKE_INSTALL_PREFIX}
)
find_program(SW_GENERATOR_BIN gnss_sim
PATHS
${GNSSSIMULATOR_ROOT_USER_DEFINED}
/usr
/usr/local
/opt/local
PATH_SUFFIXES bin
ONLY_CMAKE_FIND_ROOT_PATH
)
if(SW_GENERATOR_BIN AND CMAKE_CROSSCOMPILING)
if(CMAKE_SYSROOT)
string(REGEX REPLACE "${CMAKE_SYSROOT}" "" SW_GENERATOR_BIN "${SW_GENERATOR_BIN}")
elseif(DEFINED ENV{OECORE_TARGET_SYSROOT})
string(REGEX REPLACE "$ENV{OECORE_TARGET_SYSROOT}" "" SW_GENERATOR_BIN "${SW_GENERATOR_BIN}")
endif()
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GNSSSIMULATOR DEFAULT_MSG SW_GENERATOR_BIN)
mark_as_advanced(SW_GENERATOR_BIN)

View File

@ -0,0 +1,149 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2022 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
# - Find gnsstk library
# Find the native gnsstk includes and library
# This module defines
# GNSSTK_INCLUDE_DIR, where to find Rinex3ObsBase.hpp, etc.
# GNSSTK_FOUND, If false, do not try to use GNSSTK.
# GNSSTK_LIBRARY, where to find the GNSSTK library.
#
# Provides the following imported target:
# Gnsstk::gnsstk
#
if(NOT COMMAND feature_summary)
include(FeatureSummary)
endif()
if(NOT GNSSTK_ROOT)
set(GNSSTK_ROOT_USER_DEFINED /usr/local)
else()
set(GNSSTK_ROOT_USER_DEFINED ${GNSSTK_ROOT})
endif()
if(DEFINED ENV{GNSSTK_ROOT})
set(GNSSTK_ROOT_USER_DEFINED
${GNSSTK_ROOT_USER_DEFINED}
$ENV{GNSSTK_ROOT}
)
endif()
unset(GNSSTK_INCLUDE_DIR CACHE)
unset(GNSSTK_USES_GPSTK_NAMESPACE CACHE)
find_path(GNSSTK_INCLUDE_DIR gnsstk/Rinex3ObsBase.hpp
PATHS ${GNSSTK_ROOT_USER_DEFINED}/include
/usr/include
/usr/local/include
/opt/local/include
)
set(GNSSTK_NAMES ${CMAKE_FIND_LIBRARY_PREFIXES}gnsstk${CMAKE_SHARED_LIBRARY_SUFFIX})
if(NOT GNSSTK_INCLUDE_DIR)
find_path(GNSSTK_INCLUDE_DIR gpstk/Rinex3ObsBase.hpp
PATHS ${GNSSTK_ROOT_USER_DEFINED}/include
/usr/include
/usr/local/include
/opt/local/include
)
if(GNSSTK_INCLUDE_DIR)
set(GNSSTK_NAMES gpstk ${CMAKE_FIND_LIBRARY_PREFIXES}gpstk${CMAKE_SHARED_LIBRARY_SUFFIX})
set(GNSSTK_USES_GPSTK_NAMESPACE TRUE)
endif()
endif()
include(GNUInstallDirs)
find_library(GNSSTK_LIBRARY NAMES ${GNSSTK_NAMES}
PATHS ${GNSSTK_ROOT_USER_DEFINED}/lib
${GNSSTK_ROOT_USER_DEFINED}/${CMAKE_INSTALL_LIBDIR}
/usr/local/lib
/usr/${CMAKE_INSTALL_LIBDIR}
/usr/local/${CMAKE_INSTALL_LIBDIR}
/opt/local/lib
)
if(GNSSTK_LIBRARY AND GNSSTK_INCLUDE_DIR)
set(OLD_PACKAGE_VERSION ${PACKAGE_VERSION})
unset(PACKAGE_VERSION)
if(GNSSTK_USES_GPSTK_NAMESPACE)
if(EXISTS ${GNSSTK_INCLUDE_DIR}/../share/cmake/GPSTK/GPSTKConfigVersion.cmake)
include(${GNSSTK_INCLUDE_DIR}/../share/cmake/GPSTK/GPSTKConfigVersion.cmake)
endif()
else()
if(EXISTS ${GNSSTK_INCLUDE_DIR}/../share/cmake/GNSSTK/GNSSTKConfigVersion.cmake)
include(${GNSSTK_INCLUDE_DIR}/../share/cmake/GNSSTK/GNSSTKConfigVersion.cmake)
endif()
endif()
if(PACKAGE_VERSION)
set(GNSSTK_VERSION ${PACKAGE_VERSION})
endif()
set(PACKAGE_VERSION ${OLD_PACKAGE_VERSION})
endif()
if(GNSSTK_VERSION)
if(GNSSTK_VERSION VERSION_LESS "9.0.0")
set(GNSSTK_OLDER_THAN_9 TRUE)
endif()
if(GNSSTK_VERSION VERSION_LESS "13.0.0")
set(GNSSTK_OLDER_THAN_13 TRUE)
endif()
endif()
if(EXISTS ${GNSSTK_INCLUDE_DIR}/gnsstk/GPSEphemerisStore.hpp)
set(GNSSTK_OLDER_THAN_13 TRUE)
endif()
# handle the QUIET and REQUIRED arguments and set GNSSTK_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GNSSTK DEFAULT_MSG GNSSTK_LIBRARY GNSSTK_INCLUDE_DIR)
if(GNSSTK_FOUND AND GNSSTK_VERSION)
set_package_properties(GNSSTK PROPERTIES
DESCRIPTION "The GNSSTk C++ Library (found: v${GNSSTK_VERSION})"
)
else()
set_package_properties(GNSSTK PROPERTIES
DESCRIPTION "The GNSSTk C++ Library"
)
endif()
if(GNSSTK_FOUND AND GNSSTK_USES_GPSTK_NAMESPACE AND NOT EXISTS ${GNSSTK_INCLUDE_DIR}/gpstk/SatelliteSystem.hpp)
set(GNSSTK_OLDER_THAN_8 TRUE)
endif()
set_package_properties(GNSSTK PROPERTIES
URL "https://github.com/SGL-UT/gnsstk/"
TYPE OPTIONAL
)
if(GNSSTK_FOUND AND NOT ENABLE_OWN_GNSSTK AND NOT TARGET Gnsstk::gnsstk)
add_library(Gnsstk::gnsstk SHARED IMPORTED)
if(GNSSTK_USES_GPSTK_NAMESPACE)
set_target_properties(Gnsstk::gnsstk PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${GNSSTK_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${GNSSTK_INCLUDE_DIR};${GNSSTK_INCLUDE_DIR}/gpstk"
INTERFACE_LINK_LIBRARIES "${GNSSTK_LIBRARY}"
IMPORTED_IMPLIB "${GNSSTK_LIBRARY}"
)
else()
set_target_properties(Gnsstk::gnsstk PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${GNSSTK_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${GNSSTK_INCLUDE_DIR};${GNSSTK_INCLUDE_DIR}/gnsstk"
INTERFACE_LINK_LIBRARIES "${GNSSTK_LIBRARY}"
IMPORTED_IMPLIB "${GNSSTK_LIBRARY}"
)
endif()
endif()
mark_as_advanced(GNSSTK_LIBRARY
GNSSTK_INCLUDE_DIR
GNSSTK_USES_GPSTK_NAMESPACE
GNSSTK_OLDER_THAN_8
GNSSTK_OLDER_THAN_9
GNSSTK_OLDER_THAN_13
)

View File

@ -0,0 +1,45 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2021 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
find_program(GNUPLOT_EXECUTABLE
NAMES
gnuplot
pgnuplot
PATHS
/usr/bin
/usr/local/bin
/opt/local/bin
ONLY_CMAKE_FIND_ROOT_PATH
)
if(NOT CMAKE_CROSSCOMPILING)
if(GNUPLOT_EXECUTABLE)
execute_process(COMMAND "${GNUPLOT_EXECUTABLE}" --version
OUTPUT_VARIABLE GNUPLOT_OUTPUT_VARIABLE
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE
)
string(REGEX REPLACE "^gnuplot ([0-9\\.]+)( patchlevel )?" "\\1." GNUPLOT_VERSION_STRING "${GNUPLOT_OUTPUT_VARIABLE}")
string(REGEX REPLACE "\\.$" "" GNUPLOT_VERSION_STRING "${GNUPLOT_VERSION_STRING}")
unset(GNUPLOT_OUTPUT_VARIABLE)
endif()
else()
if(GNUPLOT_EXECUTABLE)
if(CMAKE_SYSROOT)
string(REGEX REPLACE "${CMAKE_SYSROOT}" "" GNUPLOT_EXECUTABLE "${GNUPLOT_EXECUTABLE}")
elseif(DEFINED ENV{OECORE_TARGET_SYSROOT})
string(REGEX REPLACE "$ENV{OECORE_TARGET_SYSROOT}" "" GNUPLOT_EXECUTABLE "${GNUPLOT_EXECUTABLE}")
endif()
else()
message(STATUS "Warning: Gnuplot is not found, you can install it later.")
message(STATUS " Setting default path to /usr/bin/gnuplot")
set(GNUPLOT_EXECUTABLE "/usr/bin/gnuplot")
endif()
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GNUPLOT DEFAULT_MSG GNUPLOT_EXECUTABLE)

View File

@ -0,0 +1,397 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2022 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
########################################################################
# Find GNU Radio
########################################################################
if(NOT COMMAND feature_summary)
include(FeatureSummary)
endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig)
endif()
include(FindPackageHandleStandardArgs)
# if GR_REQUIRED_COMPONENTS is not defined, it will be set to the following list
if(NOT GR_REQUIRED_COMPONENTS)
set(GR_REQUIRED_COMPONENTS RUNTIME PMT BLOCKS FFT FILTER ANALOG)
endif()
# Allows us to use all .cmake files in this directory
list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_CURRENT_LIST_DIR})
# Easily access all libraries and includes of GNU Radio
set(GNURADIO_ALL_LIBRARIES "")
set(GNURADIO_ALL_INCLUDE_DIRS "")
macro(LIST_CONTAINS var value)
set(${var})
foreach(value2 ${ARGN})
if(${value} STREQUAL ${value2})
set(${var} TRUE)
endif()
endforeach()
endmacro()
if(NOT GNURADIO_INSTALL_PREFIX)
set(GNURADIO_INSTALL_PREFIX_USER_PROVIDED /usr)
else()
set(GNURADIO_INSTALL_PREFIX_USER_PROVIDED ${GNURADIO_INSTALL_PREFIX})
endif()
if(GNURADIO_ROOT)
set(GNURADIO_INSTALL_PREFIX_USER_PROVIDED
${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}
${GNURADIO_ROOT}
)
endif()
if(DEFINED ENV{GNURADIO_ROOT})
set(GNURADIO_INSTALL_PREFIX_USER_PROVIDED
${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}
$ENV{GNURADIO_ROOT}
)
endif()
if(DEFINED ENV{GNURADIO_RUNTIME_DIR})
set(GNURADIO_INSTALL_PREFIX_USER_PROVIDED
${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}
$ENV{GNURADIO_RUNTIME_DIR}
)
endif()
set(GNURADIO_INSTALL_PREFIX_USER_PROVIDED
${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}
${CMAKE_INSTALL_PREFIX}
)
function(GR_MODULE EXTVAR PCNAME INCFILE LIBFILE)
list_contains(REQUIRED_MODULE ${EXTVAR} ${GR_REQUIRED_COMPONENTS})
if(NOT REQUIRED_MODULE)
#message("Ignoring GNU Radio Module ${EXTVAR}")
return()
endif()
message(STATUS "Checking for GNU Radio Module: ${EXTVAR}")
# check for .pc hints
pkg_check_modules(PC_GNURADIO_${EXTVAR} QUIET ${PCNAME})
if(NOT PC_GNURADIO_${EXTVAR}_FOUND)
set(PC_GNURADIO_${EXTVAR}_LIBRARIES ${LIBFILE})
endif()
set(INCVAR_NAME "GNURADIO_${EXTVAR}_INCLUDE_DIRS")
set(LIBVAR_NAME "GNURADIO_${EXTVAR}_LIBRARIES")
set(PC_INCDIR ${PC_GNURADIO_${EXTVAR}_INCLUDEDIR})
set(PC_LIBDIR ${PC_GNURADIO_${EXTVAR}_LIBDIR})
# look for include files
find_path(${INCVAR_NAME}
NAMES ${INCFILE}
HINTS ${PC_INCDIR}
PATHS ${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}/include
/usr/include
/usr/local/include
/opt/local/include
)
# look for libs
foreach(libname ${PC_GNURADIO_${EXTVAR}_LIBRARIES})
find_library(${LIBVAR_NAME}_${libname}
NAMES ${libname} ${libname}-${PC_GNURADIO_RUNTIME_VERSION}
HINTS ${PC_LIBDIR}
PATHS ${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}/lib
${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}/lib64
${GNSSSDR_LIB_PATHS}
)
list(APPEND ${LIBVAR_NAME} ${${LIBVAR_NAME}_${libname}})
endforeach()
set(${LIBVAR_NAME} ${${LIBVAR_NAME}} PARENT_SCOPE)
# show results
message(STATUS " * INCLUDES=${GNURADIO_${EXTVAR}_INCLUDE_DIRS}")
message(STATUS " * LIBS=${GNURADIO_${EXTVAR}_LIBRARIES}")
# append to all includes and libs list
set(GNURADIO_ALL_INCLUDE_DIRS ${GNURADIO_ALL_INCLUDE_DIRS} ${GNURADIO_${EXTVAR}_INCLUDE_DIRS} PARENT_SCOPE)
set(GNURADIO_ALL_LIBRARIES ${GNURADIO_ALL_LIBRARIES} ${GNURADIO_${EXTVAR}_LIBRARIES} PARENT_SCOPE)
if(GNURADIO_${EXTVAR}_LIBRARIES AND GNURADIO_${EXTVAR}_INCLUDE_DIRS)
set(GNURADIO_${EXTVAR}_FOUND TRUE)
endif()
message(STATUS "GNURADIO_${EXTVAR}_FOUND = ${GNURADIO_${EXTVAR}_FOUND}")
set(GNURADIO_${EXTVAR}_FOUND ${GNURADIO_${EXTVAR}_FOUND} PARENT_SCOPE)
# generate an error if the module is missing
if(NOT GNURADIO_${EXTVAR}_FOUND)
message(STATUS "Required GNU Radio Component: ${EXTVAR} missing!")
set(GNURADIO_FOUND FALSE) # Trick for feature_summary
endif()
# Create imported target
string(TOLOWER ${EXTVAR} gnuradio_component)
if(NOT TARGET Gnuradio::${gnuradio_component})
add_library(Gnuradio::${gnuradio_component} SHARED IMPORTED)
set(GNURADIO_LIBRARY ${GNURADIO_${EXTVAR}_LIBRARIES})
list(GET GNURADIO_LIBRARY 0 FIRST_DIR)
get_filename_component(GNURADIO_DIR ${FIRST_DIR} ABSOLUTE)
set_target_properties(Gnuradio::${gnuradio_component} PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${GNURADIO_DIR}"
INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_${EXTVAR}_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${GNURADIO_LIBRARY}"
)
endif()
mark_as_advanced(GNURADIO_${EXTVAR}_LIBRARIES GNURADIO_${EXTVAR}_INCLUDE_DIRS)
endfunction()
gr_module(RUNTIME gnuradio-runtime gnuradio/top_block.h gnuradio-runtime)
gr_module(PMT gnuradio-runtime pmt/pmt.h gnuradio-pmt)
gr_module(BLOCKS gnuradio-blocks gnuradio/blocks/api.h gnuradio-blocks)
gr_module(FEC gnuradio-fec gnuradio/fec/api.h gnuradio-fec)
gr_module(FFT gnuradio-fft gnuradio/fft/api.h gnuradio-fft)
gr_module(FILTER gnuradio-filter gnuradio/filter/api.h gnuradio-filter)
gr_module(ANALOG gnuradio-analog gnuradio/analog/api.h gnuradio-analog)
gr_module(DIGITAL gnuradio-digital gnuradio/digital/api.h gnuradio-digital)
gr_module(AUDIO gnuradio-audio gnuradio/audio/api.h gnuradio-audio)
gr_module(CHANNELS gnuradio-channels gnuradio/channels/api.h gnuradio-channels)
gr_module(QTGUI gnuradio-qtgui gnuradio/qtgui/api.h gnuradio-qtgui)
gr_module(TRELLIS gnuradio-trellis gnuradio/trellis/api.h gnuradio-trellis)
gr_module(UHD gnuradio-uhd gnuradio/uhd/api.h gnuradio-uhd)
gr_module(VOCODER gnuradio-vocoder gnuradio/vocoder/api.h gnuradio-vocoder)
gr_module(WAVELET gnuradio-wavelet gnuradio/wavelet/api.h gnuradio-wavelet)
gr_module(ZEROMQ gnuradio-zeromq gnuradio/zeromq/api.h gnuradio-zeromq)
list(REMOVE_DUPLICATES GNURADIO_ALL_INCLUDE_DIRS)
list(REMOVE_DUPLICATES GNURADIO_ALL_LIBRARIES)
if(NOT PC_GNURADIO_RUNTIME_VERSION)
set(OLD_PACKAGE_VERSION ${PACKAGE_VERSION})
unset(PACKAGE_VERSION)
list(GET GNURADIO_BLOCKS_LIBRARIES 0 FIRST_DIR)
get_filename_component(GNURADIO_BLOCKS_DIR ${FIRST_DIR} DIRECTORY)
if(EXISTS ${GNURADIO_BLOCKS_DIR}/cmake/gnuradio/GnuradioConfigVersion.cmake)
set(PACKAGE_FIND_VERSION_MAJOR 3)
set(PACKAGE_FIND_VERSION_MINOR 7)
set(PACKAGE_FIND_VERSION_PATCH 4)
include(${GNURADIO_BLOCKS_DIR}/cmake/gnuradio/GnuradioConfigVersion.cmake)
endif()
if(PACKAGE_VERSION)
set(PC_GNURADIO_RUNTIME_VERSION ${PACKAGE_VERSION})
endif()
set(PACKAGE_VERSION ${OLD_PACKAGE_VERSION})
endif()
# Trick to find out that GNU Radio is >= 3.7.4 if pkgconfig is not present
if(NOT PC_GNURADIO_RUNTIME_VERSION)
find_file(GNURADIO_VERSION_GREATER_THAN_373
NAMES gnuradio/blocks/tsb_vector_sink_f.h
PATHS ${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}/include
/usr/include
/usr/local/include
/opt/local/include
)
if(GNURADIO_VERSION_GREATER_THAN_373)
set(PC_GNURADIO_RUNTIME_VERSION "3.7.4+")
endif()
find_file(GNURADIO_VERSION_GREATER_THAN_38
NAMES gnuradio/filter/mmse_resampler_cc.h
PATHS ${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}/include
/usr/include
/usr/local/include
/opt/local/include
)
if(GNURADIO_VERSION_GREATER_THAN_38)
set(PC_GNURADIO_RUNTIME_VERSION "3.8.0+")
endif()
endif()
set(GNURADIO_VERSION ${PC_GNURADIO_RUNTIME_VERSION})
if(NOT GNSSSDR_GNURADIO_MIN_VERSION)
set(GNSSSDR_GNURADIO_MIN_VERSION "3.7.3")
endif()
if(GNURADIO_VERSION)
if(GNURADIO_VERSION VERSION_LESS ${GNSSSDR_GNURADIO_MIN_VERSION})
unset(GNURADIO_RUNTIME_FOUND)
message(STATUS "The GNU Radio version installed in your system (v${GNURADIO_VERSION}) is too old.")
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|kFreeBSD|GNU")
message("Go to https://github.com/gnuradio/pybombs")
message("and follow the instructions to install GNU Radio in your system.")
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
message("You can install it easily via Macports:")
message(" sudo port install gnuradio ")
message("Alternatively, you can use homebrew:")
message(" brew install gnuradio")
endif()
message(FATAL_ERROR "GNU Radio v${GNSSSDR_GNURADIO_MIN_VERSION} or later is required to build gnss-sdr.")
endif()
set_package_properties(GNURADIO PROPERTIES
DESCRIPTION "The free and open software radio ecosystem (found: v${GNURADIO_VERSION})"
)
else()
set_package_properties(GNURADIO PROPERTIES
DESCRIPTION "The free and open software radio ecosystem"
)
endif()
find_package_handle_standard_args(GNURADIO DEFAULT_MSG GNURADIO_RUNTIME_FOUND)
# Detect if using standard pointers
set(GNURADIO_USES_STD_POINTERS FALSE)
if(GNURADIO_VERSION VERSION_GREATER 3.8.99)
file(STRINGS ${GNURADIO_RUNTIME_INCLUDE_DIRS}/gnuradio/basic_block.h _basic_block)
foreach(_loop_var IN LISTS _basic_block)
string(STRIP "${_loop_var}" _file_line)
if("public std::enable_shared_from_this<basic_block>" STREQUAL "${_file_line}")
set(GNURADIO_USES_STD_POINTERS TRUE)
endif()
endforeach()
endif()
# Detect if FFT are templates
if(EXISTS ${GNURADIO_FFT_INCLUDE_DIRS}/gnuradio/fft/fft_vfc.h)
set(GNURADIO_FFT_USES_TEMPLATES FALSE)
else()
set(GNURADIO_FFT_USES_TEMPLATES TRUE)
endif()
# Search for IIO component
if(GNURADIO_VERSION VERSION_GREATER 3.8.99)
pkg_check_modules(PC_GNURADIO_IIO QUIET gnuradio-iio)
# look for include files
message(STATUS "Checking for GNU Radio Module: IIO")
find_path(GNURADIO_IIO_INCLUDE_DIRS
NAMES gnuradio/iio/api.h
HINTS ${PC_GNURADIO_IIO_INCLUDEDIR}
PATHS ${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}/include
/usr/include
/usr/local/include
/opt/local/include
)
# look for libs
find_library(GNURADIO_IIO_LIBRARIES
NAMES gnuradio-iio gnuradio-iio-${GNURADIO_VERSION}
HINTS ${PC_GNURADIO_IIO_LIBDIR}
PATHS ${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}/lib
${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}/lib64
${GNSSSDR_LIB_PATHS}
)
if(GNURADIO_IIO_LIBRARIES)
message(STATUS " * INCLUDES=${GNURADIO_IIO_INCLUDE_DIRS}")
message(STATUS " * LIBS=${GNURADIO_IIO_LIBRARIES}")
else()
message(STATUS " * IIO GNU Radio Module not found.")
endif()
if(GNURADIO_IIO_LIBRARIES AND GNURADIO_IIO_INCLUDE_DIRS)
set(GNURADIO_IIO_FOUND TRUE)
endif()
if(GNURADIO_IIO_FOUND)
message(STATUS "GNURADIO_IIO_FOUND = ${GNURADIO_IIO_FOUND}")
# append to all includes and libs list
set(GNURADIO_ALL_INCLUDE_DIRS ${GNURADIO_ALL_INCLUDE_DIRS} ${GNURADIO_IIO_INCLUDE_DIRS})
set(GNURADIO_ALL_LIBRARIES ${GNURADIO_ALL_LIBRARIES} ${GNURADIO_IIO_LIBRARIES})
# Create imported target
if(NOT TARGET Gnuradio::iio)
add_library(Gnuradio::iio SHARED IMPORTED)
set(GNURADIO_LIBRARY ${GNURADIO_IIO_LIBRARIES})
list(GET GNURADIO_LIBRARY 0 FIRST_DIR)
get_filename_component(GNURADIO_DIR ${FIRST_DIR} ABSOLUTE)
set_target_properties(Gnuradio::iio PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${GNURADIO_DIR}"
INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_IIO_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${GNURADIO_LIBRARY}"
)
endif()
# check templatized API
if(NOT EXISTS "${GNURADIO_IIO_INCLUDE_DIRS}/gnuradio/iio/pluto_source.h")
set(GR_IIO_TEMPLATIZED_API TRUE)
endif()
endif()
endif()
# Check if PMT uses boost::any or std::any
if(GNURADIO_PMT_INCLUDE_DIRS)
file(STRINGS ${GNURADIO_PMT_INCLUDE_DIRS}/pmt/pmt.h _pmt_content)
set(_uses_boost TRUE)
foreach(_loop_var IN LISTS _pmt_content)
string(STRIP "${_loop_var}" _file_line)
if("#include <any>" STREQUAL "${_file_line}")
set(_uses_boost FALSE)
endif()
endforeach()
if(${_uses_boost})
set(PMT_USES_BOOST_ANY TRUE)
endif()
endif()
# Check if GNU Radio uses log4cpp or spdlog
if(GNURADIO_RUNTIME_INCLUDE_DIRS)
if(EXISTS "${GNURADIO_RUNTIME_INCLUDE_DIRS}/gnuradio/logger.h")
file(STRINGS ${GNURADIO_RUNTIME_INCLUDE_DIRS}/gnuradio/logger.h _logger_content)
set(_uses_log4cpp FALSE)
set(_uses_spdlog FALSE)
foreach(_loop_var IN LISTS _logger_content)
string(STRIP "${_loop_var}" _file_line)
if("#include <log4cpp/Category.hh>" STREQUAL "${_file_line}")
set(_uses_log4cpp TRUE)
endif()
if("#include <spdlog/spdlog.h>" STREQUAL "${_file_line}")
set(_uses_spdlog TRUE)
endif()
endforeach()
if(${_uses_log4cpp})
find_package(LOG4CPP)
set_package_properties(LOG4CPP PROPERTIES
PURPOSE "Required by GNU Radio."
TYPE REQUIRED
)
if(CMAKE_VERSION VERSION_GREATER 3.13)
target_link_libraries(Gnuradio::filter INTERFACE Log4cpp::log4cpp)
target_link_libraries(Gnuradio::runtime INTERFACE Log4cpp::log4cpp)
else()
set_target_properties(Gnuradio::filter PROPERTIES INTERFACE_LINK_LIBRARIES Log4cpp::log4cpp)
set_target_properties(Gnuradio::runtime PROPERTIES INTERFACE_LINK_LIBRARIES Log4cpp::log4cpp)
endif()
endif()
if(${_uses_spdlog})
find_package(spdlog REQUIRED CONFIG)
set_package_properties(spdlog PROPERTIES
URL "https://github.com/gabime/spdlog"
DESCRIPTION "Very fast, header-only/compiled, C++ logging library (found: v${spdlog_VERSION})"
PURPOSE "Required by GNU Radio."
TYPE REQUIRED
)
set(GNURADIO_USES_SPDLOG TRUE)
if(CMAKE_VERSION VERSION_GREATER 3.13)
target_link_libraries(Gnuradio::runtime INTERFACE spdlog::spdlog)
target_link_libraries(Gnuradio::blocks INTERFACE spdlog::spdlog)
else()
set_target_properties(Gnuradio::runtime PROPERTIES INTERFACE_LINK_LIBRARIES spdlog::spdlog)
set_target_properties(Gnuradio::blocks PROPERTIES INTERFACE_LINK_LIBRARIES spdlog::spdlog)
endif()
endif()
endif()
endif()
set_package_properties(GNURADIO PROPERTIES
URL "https://www.gnuradio.org/"
)

View File

@ -0,0 +1,82 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
# - Try to find Googletest source code
#
# The following environment variable is optionally searched for:
# GTEST_DIR: Base directory where Googletest source code is found.
#
# The following are set after configuration is done:
# GOOGLETEST_FOUND
# LIBGTEST_DEV_DIR
# GTEST_INCLUDE_DIRS
if(NOT COMMAND feature_summary)
include(FeatureSummary)
endif()
if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig)
endif()
pkg_check_modules(PC_GTEST gtest)
if(NOT GTEST_DIR)
set(GTEST_DIR_USER_PROVIDED /usr/local)
else()
set(GTEST_DIR_USER_PROVIDED ${GTEST_DIR})
endif()
if(DEFINED ENV{GTEST_DIR})
set(GTEST_DIR_USER_PROVIDED
${GTEST_DIR_USER_PROVIDED}
$ENV{GTEST_DIR}
)
endif()
find_path(LIBGTEST_DEV_DIR
NAMES src/gtest-all.cc
PATHS
${GTEST_DIR_USER_PROVIDED}
${GTEST_DIR_USER_PROVIDED}/googletest
/usr/src/googletest/googletest
/usr/src/gtest
/usr/include/gtest
/usr/local/src/googletest/googletest
/opt/local/src/gtest-1.7.0
/opt/homebrew/opt/googletest/include/googletest/googletest
)
find_path(GTEST_INCLUDE_DIRS
NAMES gtest/gtest.h
HINTS ${PC_GTEST_INCLUDEDIR}
PATHS
${GTEST_DIR_USER_PROVIDED}/googletest/include
/usr/include
/usr/local/include
/opt/local/src/gtest-1.7.0/include
/opt/homebrew/opt/googletest/include
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GOOGLETEST DEFAULT_MSG LIBGTEST_DEV_DIR GTEST_INCLUDE_DIRS)
if(GOOGLETEST_FOUND AND PC_GTEST_VERSION)
set(GOOGLETEST_VERSION ${PC_GTEST_VERSION})
set_package_properties(GOOGLETEST PROPERTIES
DESCRIPTION "Source code of Google's Testing Framework (found: v${GOOGLETEST_VERSION})"
)
else()
set_package_properties(GOOGLETEST PROPERTIES
DESCRIPTION "Source code of Google's Testing Framework"
)
endif()
set_package_properties(GOOGLETEST PROPERTIES
URL "https://github.com/google/googletest"
)
mark_as_advanced(LIBGTEST_DEV_DIR GTEST_INCLUDE_DIRS)

View File

@ -0,0 +1,149 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
# Tries to find Gperftools.
#
# Usage of this module as follows:
#
# find_package(GPERFTOOLS)
#
# Variables used by this module, they can change the default behaviour and need
# to be set before calling find_package:
#
# GPERFTOOLS_ROOT Set this variable to the root installation of
# Gperftools if the module has problems finding
# the proper installation path.
#
# Variables defined by this module:
#
# GPERFTOOLS_FOUND System has Gperftools libs/headers
# GPERFTOOLS_LIBRARIES The Gperftools libraries (tcmalloc & profiler)
# GPERFTOOLS_INCLUDE_DIR The location of Gperftools headers
#
# Provides the following imported targets:
# Gperftools::tcmalloc
# Gperftools::profiler
# Gperftools::gperftools
#
if(NOT COMMAND feature_summary)
include(FeatureSummary)
endif()
if(NOT GPERFTOOLS_ROOT)
set(GPERFTOOLS_ROOT_USER_DEFINED /usr/local)
else()
set(GPERFTOOLS_ROOT_USER_DEFINED ${GPERFTOOLS_ROOT})
endif()
if(DEFINED ENV{GPERFTOOLS_ROOT})
set(GPERFTOOLS_ROOT_USER_DEFINED
${GPERFTOOLS_ROOT_USER_DEFINED}
$ENV{GPERFTOOLS_ROOT}
)
endif()
if(Gperftools_ROOT_DIR)
set(GPERFTOOLS_ROOT_USER_DEFINED
${GPERFTOOLS_ROOT_USER_DEFINED}
${Gperftools_ROOT_DIR}
)
endif()
find_library(GPERFTOOLS_TCMALLOC
NAMES tcmalloc
PATHS ${GPERFTOOLS_ROOT_USER_DEFINED}/lib
${GPERFTOOLS_ROOT_USER_DEFINED}/lib64
/usr/lib
/usr/lib64
/usr/local/lib
/usr/local/lib64
/opt/local/lib
)
find_library(GPERFTOOLS_PROFILER
NAMES profiler
PATHS ${GPERFTOOLS_ROOT_USER_DEFINED}/lib
${GPERFTOOLS_ROOT_USER_DEFINED}/lib64
/usr/lib
/usr/lib64
/usr/local/lib
/usr/local/lib64
/opt/local/lib
)
find_library(GPERFTOOLS_TCMALLOC_AND_PROFILER
NAMES tcmalloc_and_profiler
PATHS ${GPERFTOOLS_ROOT_USER_DEFINED}/lib
${GPERFTOOLS_ROOT_USER_DEFINED}/lib64
/usr/lib
/usr/lib64
/usr/local/lib
/usr/local/lib64
/opt/local/lib
)
find_path(GPERFTOOLS_INCLUDE_DIR
NAMES gperftools/heap-profiler.h
PATHS /usr/include
/usr/local/include
/opt/local/include
${GPERFTOOLS_ROOT_USER_DEFINED}/include
)
set(GPERFTOOLS_LIBRARIES ${GPERFTOOLS_TCMALLOC_AND_PROFILER})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
GPERFTOOLS
DEFAULT_MSG
GPERFTOOLS_LIBRARIES
GPERFTOOLS_INCLUDE_DIR
GPERFTOOLS_TCMALLOC
GPERFTOOLS_PROFILER
)
if(GPERFTOOLS_FOUND AND NOT TARGET Gperftools::tcmalloc)
add_library(Gperftools::tcmalloc SHARED IMPORTED)
set_target_properties(Gperftools::tcmalloc PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${GPERFTOOLS_TCMALLOC}"
INTERFACE_INCLUDE_DIRECTORIES "${GPERFTOOLS_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${GPERFTOOLS_TCMALLOC}"
)
endif()
if(GPERFTOOLS_FOUND AND NOT TARGET Gperftools::profiler)
add_library(Gperftools::profiler SHARED IMPORTED)
set_target_properties(Gperftools::profiler PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${GPERFTOOLS_PROFILER}"
INTERFACE_INCLUDE_DIRECTORIES "${GPERFTOOLS_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${GPERFTOOLS_PROFILER}"
)
endif()
if(GPERFTOOLS_FOUND AND NOT TARGET Gperftools::gperftools)
add_library(Gperftools::gperftools SHARED IMPORTED)
set_target_properties(Gperftools::gperftools PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${GPERFTOOLS_TCMALLOC_AND_PROFILER}"
INTERFACE_INCLUDE_DIRECTORIES "${GPERFTOOLS_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${GPERFTOOLS_TCMALLOC_AND_PROFILER}"
)
endif()
set_package_properties(GPERFTOOLS PROPERTIES
URL "https://github.com/gperftools/gperftools"
DESCRIPTION "Collection of performance analysis tools"
)
mark_as_advanced(
GPERFTOOLS_TCMALLOC
GPERFTOOLS_PROFILER
GPERFTOOLS_TCMALLOC_AND_PROFILER
GPERFTOOLS_LIBRARIES
GPERFTOOLS_INCLUDE_DIR
)

View File

@ -1,87 +0,0 @@
# - Find gpstk library
# Find the native gpstk includes and library
# This module defines
# GPSTK_INCLUDE_DIR, where to find tiff.h, etc.
# GPSTK_LIBRARIES, libraries to link against to use GPSTK.
# GPSTK_FOUND, If false, do not try to use GPSTK.
# also defined, but not for general use are
# GPSTK_LIBRARY, where to find the GPSTK library.
FIND_PATH(GPSTK_INCLUDE_DIR gpstk/Matrix.hpp)
FIND_PATH(GEOMATICS_INCLUDE_DIR gpstk/random.hpp)
FIND_PATH(PROCFRAME_INCLUDE_DIR gpstk/SolverWMS.hpp)
FIND_PATH(VDRAW_INCLUDE_DIR gpstk/Layout.hpp)
FIND_PATH(VPLOT_INCLUDE_DIR gpstk/ScatterPlot.hpp)
FIND_PATH(RXIO_INCLUDE_DIR gpstk/EphReader.hpp)
SET(GPSTK_NAMES ${GPSTK_NAMES} gpstk libgpstk)
FIND_LIBRARY(GPSTK_LIBRARY NAMES ${GPSTK_NAMES} )
SET(GEOMATICS_NAMES ${GEOMATICS_NAMES} geomatics libgeomatics)
FIND_LIBRARY(GEOMATICS_LIBRARY NAMES ${GEOMATICS_NAMES} )
SET(PROCFRAME_NAMES ${PROCFRAME_NAMES} procframe libprocframe)
FIND_LIBRARY(PROCFRAME_LIBRARY NAMES ${PROCFRAME_NAMES} )
SET(VDRAW_NAMES ${VDRAW_NAMES} vdraw libvdraw)
FIND_LIBRARY(VDRAW_LIBRARY NAMES ${VDRAW_NAMES} )
SET(VPLOT_NAMES ${VPLOT_NAMES} vplot libvplot)
FIND_LIBRARY(VPLOT_LIBRARY NAMES ${VPLOT_NAMES} )
SET(RXIO_NAMES ${RXIO_NAMES} rxio librxio)
FIND_LIBRARY(RXIO_LIBRARY NAMES ${RXIO_NAMES} )
# handle the QUIETLY and REQUIRED arguments and set GPSTK_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GPSTK DEFAULT_MSG GPSTK_LIBRARY GPSTK_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GEOMATICS DEFAULT_MSG GEOMATICS_LIBRARY GEOMATICS_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROCFRAME DEFAULT_MSG PROCFRAME_LIBRARY PROCFRAME_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(VDRAW DEFAULT_MSG VDRAW_LIBRARY VDRAW_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(VPLOT DEFAULT_MSG VPLOT_LIBRARY VPLOT_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(RXIO DEFAULT_MSG RXIO_LIBRARY RXIO_INCLUDE_DIR)
IF(GPSTK_FOUND)
SET( GPSTK_LIBRARIES ${GPSTK_LIBRARY} )
ENDIF(GPSTK_FOUND)
IF(GEOMATICS_FOUND)
SET( GEOMATICS_LIBRARIES ${GEOMATICS_LIBRARY} )
ENDIF(GEOMATICS_FOUND)
IF(PROCFRAME_FOUND)
SET( PROCFRAME_LIBRARIES ${PROCFRAME_LIBRARY} )
ENDIF(PROCFRAME_FOUND)
IF(VDRAW_FOUND)
SET( VDRAW_LIBRARIES ${VDRAW_LIBRARY} )
ENDIF(VDRAW_FOUND)
IF(VPLOT_FOUND)
SET( VPLOT_LIBRARIES ${VPLOT_LIBRARY} )
ENDIF(VPLOT_FOUND)
IF(RXIO_FOUND)
SET( RXIO_LIBRARIES ${RXIO_LIBRARY} )
ENDIF(RXIO_FOUND)
MARK_AS_ADVANCED(GPSTK_INCLUDE_DIR GPSTK_LIBRARY)
MARK_AS_ADVANCED(GEOMATICS_INCLUDE_DIR GEOMATICS_LIBRARY)
MARK_AS_ADVANCED(PROCFRAME_INCLUDE_DIR PROCFRAME_LIBRARY)
MARK_AS_ADVANCED(VDRAW_INCLUDE_DIR VDRAW_LIBRARY)
MARK_AS_ADVANCED(VPLOT_INCLUDE_DIR VPLOT_LIBRARY)
MARK_AS_ADVANCED(RXIO_INCLUDE_DIR RXIO_LIBRARY)

View File

@ -0,0 +1,80 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
########################################################################
# Find GR-DBFCTTC Module
########################################################################
#
# Provides the following imported target:
# Gnuradio::dbfcttc
#
if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig)
endif()
pkg_check_modules(PC_GR_DBFCTTC gr-dbfcttc)
if(NOT GRDBFCTTC_ROOT)
set(GRDBFCTTC_ROOT_USER_DEFINED /usr/local)
else()
set(GRDBFCTTC_ROOT_USER_DEFINED ${GRDBFCTTC_ROOT})
endif()
if(DEFINED ENV{GRDBFCTTC_ROOT})
set(GRDBFCTTC_ROOT_USER_DEFINED
${GRDBFCTTC_ROOT_USER_DEFINED}
$ENV{GRDBFCTTC_ROOT}
)
endif()
if(DEFINED ENV{GR_DBFCTTC_DIR})
set(GRDBFCTTC_ROOT_USER_DEFINED
${GRDBFCTTC_ROOT_USER_DEFINED}
$ENV{GR_DBFCTTC_DIR}
)
endif()
set(GRDBFCTTC_ROOT_USER_DEFINED
${GRDBFCTTC_ROOT_USER_DEFINED}
${CMAKE_INSTALL_PREFIX}
)
find_path(
GR_DBFCTTC_INCLUDE_DIRS
NAMES dbfcttc/api.h
HINTS ${PC_GR_DBFCTTC_INCLUDEDIR}
PATHS ${GRDBFCTTC_ROOT_USER_DEFINED}/include
/usr/include
/usr/local/include
/opt/local/include
)
find_library(
GR_DBFCTTC_LIBRARIES
NAMES gnuradio-dbfcttc
HINTS ${PC_GR_DBFCTTC_LIBDIR}
PATHS ${GRDBFCTTC_ROOT_USER_DEFINED}/lib
${GRDBFCTTC_ROOT_USER_DEFINED}/lib64
/usr/lib
/usr/lib64
/usr/local/lib
/usr/local/lib64
/opt/local/lib
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GRDBFCTTC DEFAULT_MSG GR_DBFCTTC_LIBRARIES GR_DBFCTTC_INCLUDE_DIRS)
if(GRDBFCTTC_FOUND AND NOT TARGET Gnuradio::dbfcttc)
add_library(Gnuradio::dbfcttc SHARED IMPORTED)
set_target_properties(Gnuradio::dbfcttc PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${GR_DBFCTTC_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${GR_DBFCTTC_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${GR_DBFCTTC_LIBRARIES}"
)
endif()
mark_as_advanced(GR_DBFCTTC_LIBRARIES GR_DBFCTTC_INCLUDE_DIRS)

View File

@ -0,0 +1,110 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
#
# Provides the following imported target:
# Gnuradio::iio
#
if(NOT COMMAND feature_summary)
include(FeatureSummary)
endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig)
endif()
pkg_check_modules(PC_IIO gnuradio-iio)
if(NOT GRIIO_ROOT)
set(GRIIO_ROOT_USER_DEFINED /usr)
else()
set(GRIIO_ROOT_USER_DEFINED ${GRIIO_ROOT})
endif()
if(DEFINED ENV{GRIIO_ROOT})
set(GRIIO_ROOT_USER_DEFINED
${GRIIO_ROOT_USER_DEFINED}
$ENV{GRIIO_ROOT}
)
endif()
if(DEFINED ENV{IIO_DIR})
set(GRIIO_ROOT_USER_DEFINED
${GRIIO_ROOT_USER_DEFINED}
$ENV{IIO_DIR}
)
endif()
set(GRIIO_ROOT_USER_DEFINED
${GRIIO_ROOT_USER_DEFINED}
${CMAKE_INSTALL_PREFIX}
)
find_path(IIO_INCLUDE_DIRS
NAMES gnuradio/iio/api.h
HINTS ${PC_IIO_INCLUDEDIR}
PATHS ${GRIIO_ROOT_USER_DEFINED}/include
/usr/include
/usr/local/include
/opt/local/include
)
if(IIO_INCLUDE_DIRS)
set(GR_IIO_INCLUDE_HAS_GNURADIO TRUE)
else()
find_path(IIO_INCLUDE_DIRS
NAMES iio/api.h
HINTS ${PC_IIO_INCLUDEDIR}
PATHS ${GRIIO_ROOT_USER_DEFINED}/include
/usr/include
/usr/local/include
/opt/local/include
)
set(GR_IIO_INCLUDE_HAS_GNURADIO FALSE)
endif()
find_library(IIO_LIBRARIES
NAMES gnuradio-iio
HINTS ${PC_IIO_LIBDIR}
PATHS ${GRIIO_ROOT_USER_DEFINED}/lib
${GRIIO_ROOT_USER_DEFINED}/lib64
${GNSSSDR_LIB_PATHS}
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GRIIO DEFAULT_MSG IIO_LIBRARIES IIO_INCLUDE_DIRS)
if(PC_IIO_VERSION)
set(GRIIO_VERSION ${PC_IIO_VERSION})
endif()
set_package_properties(GRIIO PROPERTIES
URL "https://github.com/analogdevicesinc/gr-iio"
)
if(GRIIO_FOUND AND GRIIO_VERSION)
set_package_properties(GRIIO PROPERTIES
DESCRIPTION "IIO blocks for GNU Radio (found: v${GRIIO_VERSION})"
)
else()
set_package_properties(GRIIO PROPERTIES
DESCRIPTION "IIO blocks for GNU Radio"
)
endif()
if(GRIIO_FOUND AND NOT TARGET Gnuradio::iio)
add_library(Gnuradio::iio SHARED IMPORTED)
set_target_properties(Gnuradio::iio PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${IIO_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${IIO_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${IIO_LIBRARIES}"
)
endif()
mark_as_advanced(IIO_LIBRARIES IIO_INCLUDE_DIRS GR_IIO_INCLUDE_HAS_GNURADIO)

View File

@ -0,0 +1,140 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
# Tries to find gr-limesdr.
#
# Usage of this module as follows:
#
# find_package(GRLIMESDR)
#
# Variables used by this module, they can change the default behaviour and need
# to be set before calling find_package:
#
# GrLimeSDR_ROOT_DIR Set this variable to the root installation of
# gr-limesdr if the module has problems finding
# the proper installation path.
#
# Variables defined by this module:
#
# GRLIMESDR_FOUND System has gr-limesdr libs/headers
# GRLIMESDR_LIBRARIES The gr-limesdr libraries (gnuradio-limesdr)
# GRLIMESDR_INCLUDE_DIR The location of gr-limesdr headers
#
# Provides the following imported target:
# Gnuradio::limesdr
#
if(NOT COMMAND feature_summary)
include(FeatureSummary)
endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig)
endif()
pkg_check_modules(GRLIMESDR_PKG QUIET gnuradio-limesdr)
if(NOT GRLIMESDR_ROOT)
set(GRLIMESDR_ROOT_USER_DEFINED /usr)
else()
set(GRLIMESDR_ROOT_USER_DEFINED ${GRLIMESDR_ROOT})
endif()
if(DEFINED ENV{GRLIMESDR_ROOT})
set(GRLIMESDR_ROOT_USER_DEFINED
${GRLIMESDR_ROOT_USER_DEFINED}
$ENV{GRLIMESDR_ROOT}
)
endif()
find_path(GRLIMESDR_INCLUDE_DIR
NAMES
limesdr/source.h
limesdr/api.h
HINTS
${GRLIMESDR_PKG_INCLUDEDIR}
PATHS
${GRLIMESDR_ROOT_USER_DEFINED}/include
/usr/include
/usr/local/include
/opt/local/include
)
find_library(GRLIMESDR_LIBRARIES
NAMES
gnuradio-limesdr
HINTS
${GRLIMESDR_PKG_LIBDIR}
PATHS
${GRLIMESDR_ROOT_USER_DEFINED}/lib
${GRLIMESDR_ROOT_USER_DEFINED}/lib64
${GNSSSDR_LIB_PATHS}
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GRLIMESDR DEFAULT_MSG GRLIMESDR_LIBRARIES GRLIMESDR_INCLUDE_DIR)
if(GRLIMESDR_PKG_VERSION)
set(GRLIMESDR_VERSION_AUX ${GRLIMESDR_PKG_VERSION})
string(REGEX REPLACE "^v" "" GRLIMESDR_VERSION ${GRLIMESDR_VERSION_AUX})
endif()
set_package_properties(GRLIMESDR PROPERTIES
URL "https://github.com/myriadrf/gr-limesdr"
)
if(GRLIMESDR_FOUND AND GRLIMESDR_VERSION)
set_package_properties(GRLIMESDR PROPERTIES
DESCRIPTION "LimeSDR GNU Radio blocks (found: v${GRLIMESDR_VERSION})"
)
else()
set_package_properties(GRLIMESDR PROPERTIES
DESCRIPTION "LimeSDR GNU Radio blocks"
)
endif()
if(GRLIMESDR_FOUND AND NOT TARGET Gnuradio::limesdr)
add_library(Gnuradio::limesdr SHARED IMPORTED)
set_target_properties(Gnuradio::limesdr PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${GRLIMESDR_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${GRLIMESDR_INCLUDE_DIR};${GRLIMESDR_INCLUDE_DIR}/limesdr"
INTERFACE_LINK_LIBRARIES "${GRLIMESDR_LIBRARIES}"
)
message(STATUS "The (optional) gr-limesdr module has been found.")
# check for PPS custom version
file(READ ${GRLIMESDR_INCLUDE_DIR}/limesdr/source.h TMPTXT)
string(FIND "${TMPTXT}" "enable_PPS_mode" matchres)
if(${matchres} EQUAL -1)
message(STATUS " Using standard gr-limesdr library.")
else()
set(GRLIMESDR_PPS TRUE)
message(STATUS " Using custom gr-limesdr library with PPS support.")
endif()
# check gr-limesdr branch
set(_g38_branch TRUE)
file(STRINGS ${GRLIMESDR_INCLUDE_DIR}/limesdr/source.h _limesdr_header_content)
foreach(_loop_var IN LISTS _limesdr_header_content)
string(STRIP "${_loop_var}" _file_line)
if("static sptr make(std::string serial, int channel_mode, const std::string& filename);" STREQUAL "${_file_line}")
set(_g38_branch FALSE)
endif()
if("make(std::string serial, int channel_mode, const std::string& filename, bool enable_PPS_mode);" STREQUAL "${_file_line}")
set(_g38_branch FALSE)
endif()
endforeach()
if(${_g38_branch})
set(GR_LIMESDR_IS_G38_BRANCH TRUE)
endif()
endif()
mark_as_advanced(GRLIMESDR_LIBRARIES GRLIMESDR_INCLUDE_DIR)

View File

@ -0,0 +1,112 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
# Tries to find gr-osmosdr.
#
# Usage of this module as follows:
#
# find_package(GROSMOSDR)
#
# Variables used by this module, they can change the default behaviour and need
# to be set before calling find_package:
#
# GrOsmoSDR_ROOT_DIR Set this variable to the root installation of
# gr-osmosdr if the module has problems finding
# the proper installation path.
#
# Variables defined by this module:
#
# GROSMOSDR_FOUND System has gr-osmosdr libs/headers
# GROSMOSDR_LIBRARIES The gr-osmosdr libraries (gnuradio-osmosdr)
# GROSMOSDR_INCLUDE_DIR The location of gr-osmosdr headers
#
# Provides the following imported target:
# Gnuradio::osmosdr
#
if(NOT COMMAND feature_summary)
include(FeatureSummary)
endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig)
endif()
pkg_check_modules(GROSMOSDR_PKG gnuradio-osmosdr)
if(NOT GROSMOSDR_ROOT)
set(GROSMOSDR_ROOT_USER_DEFINED /usr)
else()
set(GROSMOSDR_ROOT_USER_DEFINED ${GROSMOSDR_ROOT})
endif()
if(DEFINED ENV{GROSMOSDR_ROOT})
set(GROSMOSDR_ROOT_USER_DEFINED
${GROSMOSDR_ROOT_USER_DEFINED}
$ENV{GROSMOSDR_ROOT}
)
endif()
find_path(GROSMOSDR_INCLUDE_DIR
NAMES
osmosdr/source.h
osmosdr/api.h
HINTS
${GROSMOSDR_PKG_INCLUDEDIR}
PATHS
${GROSMOSDR_ROOT_USER_DEFINED}/include
/usr/include
/usr/local/include
/opt/local/include
)
find_library(GROSMOSDR_LIBRARIES
NAMES
gnuradio-osmosdr
HINTS
${GROSMOSDR_PKG_LIBDIR}
PATHS
${GROSMOSDR_ROOT_USER_DEFINED}/lib
${GROSMOSDR_ROOT_USER_DEFINED}/lib64
${GNSSSDR_LIB_PATHS}
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GROSMOSDR DEFAULT_MSG GROSMOSDR_LIBRARIES GROSMOSDR_INCLUDE_DIR)
if(GROSMOSDR_PKG_VERSION)
set(GROSMOSDR_VERSION_AUX ${GROSMOSDR_PKG_VERSION})
string(REGEX REPLACE "^v" "" GROSMOSDR_VERSION ${GROSMOSDR_VERSION_AUX})
endif()
set_package_properties(GROSMOSDR PROPERTIES
URL "https://osmocom.org/projects/gr-osmosdr/wiki"
)
if(GROSMOSDR_FOUND AND GROSMOSDR_VERSION)
set_package_properties(GROSMOSDR PROPERTIES
DESCRIPTION "osmocom GNU Radio blocks (found: v${GROSMOSDR_VERSION})"
)
else()
set_package_properties(GROSMOSDR PROPERTIES
DESCRIPTION "osmocom GNU Radio blocks"
)
endif()
if(GROSMOSDR_FOUND AND NOT TARGET Gnuradio::osmosdr)
add_library(Gnuradio::osmosdr SHARED IMPORTED)
set_target_properties(Gnuradio::osmosdr PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${GROSMOSDR_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${GROSMOSDR_INCLUDE_DIR};${GROSMOSDR_INCLUDE_DIR}/osmosdr"
INTERFACE_LINK_LIBRARIES "${GROSMOSDR_LIBRARIES}"
)
endif()
mark_as_advanced(GROSMOSDR_LIBRARIES GROSMOSDR_INCLUDE_DIR)

View File

@ -1,130 +0,0 @@
########################################################################
# Find GNU Radio
########################################################################
INCLUDE(FindPkgConfig)
INCLUDE(FindPackageHandleStandardArgs)
# if GR_REQUIRED_COMPONENTS is not defined, it will be set to the following list
if(NOT GR_REQUIRED_COMPONENTS)
set(GR_REQUIRED_COMPONENTS RUNTIME ANALOG BLOCKS DIGITAL FFT FILTER PMT FEC TRELLIS UHD)
endif()
# Allows us to use all .cmake files in this directory
list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_CURRENT_LIST_DIR})
# Easily access all libraries and includes of GNU Radio
set(GNURADIO_ALL_LIBRARIES "")
set(GNURADIO_ALL_INCLUDE_DIRS "")
MACRO(LIST_CONTAINS var value)
SET(${var})
FOREACH(value2 ${ARGN})
IF (${value} STREQUAL ${value2})
SET(${var} TRUE)
ENDIF(${value} STREQUAL ${value2})
ENDFOREACH(value2)
ENDMACRO(LIST_CONTAINS)
function(GR_MODULE EXTVAR PCNAME INCFILE LIBFILE)
LIST_CONTAINS(REQUIRED_MODULE ${EXTVAR} ${GR_REQUIRED_COMPONENTS})
if(NOT REQUIRED_MODULE)
#message("Ignoring GNU Radio Module ${EXTVAR}")
return()
endif()
message(STATUS "Checking for GNU Radio Module: ${EXTVAR}")
# check for .pc hints
PKG_CHECK_MODULES(PC_GNURADIO_${EXTVAR} ${PCNAME})
if(NOT PC_GNURADIO_${EXTVAR}_FOUND)
set(PC_GNURADIO_${EXTVAR}_LIBRARIES ${LIBFILE})
endif()
set(INCVAR_NAME "GNURADIO_${EXTVAR}_INCLUDE_DIRS")
set(LIBVAR_NAME "GNURADIO_${EXTVAR}_LIBRARIES")
set(PC_INCDIR ${PC_GNURADIO_${EXTVAR}_INCLUDEDIR})
set(PC_LIBDIR ${PC_GNURADIO_${EXTVAR}_LIBDIR})
# look for include files
FIND_PATH(
${INCVAR_NAME}
NAMES ${INCFILE}
HINTS $ENV{GNURADIO_RUNTIME_DIR}/include
${PC_INCDIR}
${CMAKE_INSTALL_PREFIX}/include
${GNURADIO_INSTALL_PREFIX}/include
PATHS /usr/local/include
/usr/include
${GNURADIO_INSTALL_PREFIX}/include
)
# look for libs
foreach(libname ${PC_GNURADIO_${EXTVAR}_LIBRARIES})
FIND_LIBRARY(
${LIBVAR_NAME}_${libname}
NAMES ${libname}
HINTS $ENV{GNURADIO_RUNTIME_DIR}/lib
${PC_LIBDIR}
${CMAKE_INSTALL_PREFIX}/lib/
${CMAKE_INSTALL_PREFIX}/lib64/
${GNURADIO_INSTALL_PREFIX}/lib/
${GNURADIO_INSTALL_PREFIX}/lib64
PATHS /usr/local/lib
/usr/local/lib64
/usr/lib
/usr/lib64
${GNURADIO_INSTALL_PREFIX}/lib
)
list(APPEND ${LIBVAR_NAME} ${${LIBVAR_NAME}_${libname}})
endforeach(libname)
set(${LIBVAR_NAME} ${${LIBVAR_NAME}} PARENT_SCOPE)
# show results
message(STATUS " * INCLUDES=${GNURADIO_${EXTVAR}_INCLUDE_DIRS}")
message(STATUS " * LIBS=${GNURADIO_${EXTVAR}_LIBRARIES}")
# append to all includes and libs list
set(GNURADIO_ALL_INCLUDE_DIRS ${GNURADIO_ALL_INCLUDE_DIRS} ${GNURADIO_${EXTVAR}_INCLUDE_DIRS} PARENT_SCOPE)
set(GNURADIO_ALL_LIBRARIES ${GNURADIO_ALL_LIBRARIES} ${GNURADIO_${EXTVAR}_LIBRARIES} PARENT_SCOPE)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GNURADIO_${EXTVAR} DEFAULT_MSG GNURADIO_${EXTVAR}_LIBRARIES GNURADIO_${EXTVAR}_INCLUDE_DIRS)
message(STATUS "GNURADIO_${EXTVAR}_FOUND = ${GNURADIO_${EXTVAR}_FOUND}")
set(GNURADIO_${EXTVAR}_FOUND ${GNURADIO_${EXTVAR}_FOUND} PARENT_SCOPE)
# generate an error if the module is missing
if(NOT GNURADIO_${EXTVAR}_FOUND)
message(STATUS "Required GNU Radio Component: ${EXTVAR} missing!")
endif()
MARK_AS_ADVANCED(GNURADIO_${EXTVAR}_LIBRARIES GNURADIO_${EXTVAR}_INCLUDE_DIRS)
endfunction()
GR_MODULE(RUNTIME gnuradio-runtime gnuradio/top_block.h gnuradio-runtime)
GR_MODULE(ANALOG gnuradio-analog gnuradio/analog/api.h gnuradio-analog)
GR_MODULE(ATSC gnuradio-atsc gnuradio/atsc/api.h gnuradio-atsc)
GR_MODULE(AUDIO gnuradio-audio gnuradio/audio/api.h gnuradio-audio)
GR_MODULE(BLOCKS gnuradio-blocks gnuradio/blocks/api.h gnuradio-blocks)
GR_MODULE(CHANNELS gnuradio-channels gnuradio/channels/api.h gnuradio-channels)
GR_MODULE(DIGITAL gnuradio-digital gnuradio/digital/api.h gnuradio-digital)
GR_MODULE(FCD gnuradio-fcd gnuradio/fcd_api.h gnuradio-fcd)
GR_MODULE(FEC gnuradio-fec gnuradio/fec/api.h gnuradio-fec)
GR_MODULE(FFT gnuradio-fft gnuradio/fft/api.h gnuradio-fft)
GR_MODULE(FILTER gnuradio-filter gnuradio/filter/api.h gnuradio-filter)
GR_MODULE(NOAA gnuradio-noaa gnuradio/noaa/api.h gnuradio-noaa)
GR_MODULE(PAGER gnuradio-pager gnuradio/pager/api.h gnuradio-pager)
GR_MODULE(QTGUI gnuradio-qtgui gnuradio/qtgui/api.h gnuradio-qtgui)
GR_MODULE(TRELLIS gnuradio-trellis gnuradio/trellis/api.h gnuradio-trellis)
GR_MODULE(UHD gnuradio-uhd gnuradio/uhd/api.h gnuradio-uhd)
GR_MODULE(VOCODER gnuradio-vocoder gnuradio/vocoder/api.h gnuradio-vocoder)
GR_MODULE(WAVELET gnuradio-wavelet gnuradio/wavelet/api.h gnuradio-wavelet)
GR_MODULE(WXGUI gnuradio-wxgui gnuradio/wxgui/api.h gnuradio-wxgui)
GR_MODULE(PMT gnuradio-runtime pmt/pmt.h gnuradio-pmt)
list(REMOVE_DUPLICATES GNURADIO_ALL_INCLUDE_DIRS)
list(REMOVE_DUPLICATES GNURADIO_ALL_LIBRARIES)

View File

@ -1,52 +0,0 @@
# Tries to find Gperftools.
#
# Usage of this module as follows:
#
# find_package(Gperftools)
#
# Variables used by this module, they can change the default behaviour and need
# to be set before calling find_package:
#
# Gperftools_ROOT_DIR Set this variable to the root installation of
# Gperftools if the module has problems finding
# the proper installation path.
#
# Variables defined by this module:
#
# GPERFTOOLS_FOUND System has Gperftools libs/headers
# GPERFTOOLS_LIBRARIES The Gperftools libraries (tcmalloc & profiler)
# GPERFTOOLS_INCLUDE_DIR The location of Gperftools headers
find_library(GPERFTOOLS_TCMALLOC
NAMES tcmalloc
HINTS ${Gperftools_ROOT_DIR}/lib)
find_library(GPERFTOOLS_PROFILER
NAMES profiler
HINTS ${Gperftools_ROOT_DIR}/lib)
find_library(GPERFTOOLS_TCMALLOC_AND_PROFILER
NAMES tcmalloc_and_profiler
HINTS ${Gperftools_ROOT_DIR}/lib)
find_path(GPERFTOOLS_INCLUDE_DIR
NAMES gperftools/heap-profiler.h
HINTS ${Gperftools_ROOT_DIR}/include)
set(GPERFTOOLS_LIBRARIES ${GPERFTOOLS_TCMALLOC_AND_PROFILER})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
Gperftools
DEFAULT_MSG
GPERFTOOLS_LIBRARIES
GPERFTOOLS_INCLUDE_DIR
)
mark_as_advanced(
Gperftools_ROOT_DIR
GPERFTOOLS_TCMALLOC
GPERFTOOLS_PROFILER
GPERFTOOLS_TCMALLOC_AND_PROFILER
GPERFTOOLS_LIBRARIES
GPERFTOOLS_INCLUDE_DIR)

View File

@ -1,51 +0,0 @@
# Tries to find gr-osmosdr.
#
# Usage of this module as follows:
#
# find_package(GrOsmoSDR)
#
# Variables used by this module, they can change the default behaviour and need
# to be set before calling find_package:
#
# GrOsmoSDR_ROOT_DIR Set this variable to the root installation of
# gr-osmosdr if the module has problems finding
# the proper installation path.
#
# Variables defined by this module:
#
# GROSMOSDR_FOUND System has gr-osmosdr libs/headers
# GROSMOSDR_LIBRARIES The gr-osmosdr libraries (gnuradio-osmosdr)
# GROSMOSDR_INCLUDE_DIR The location of gr-osmosdr headers
FIND_PATH(GROSMOSDR_INCLUDE_DIR
NAMES osmosdr/source.h
osmosdr/api.h
HINTS ${GrOsmoSDR_ROOT_DIR}/include
PATHS /usr/local/include
/usr/include
)
find_library(GROSMOSDR_LIBRARIES
NAMES gnuradio-osmosdr
HINTS ${GrOsmoSDR_ROOT_DIR}/lib
PATHS /usr/local/lib
/usr/lib
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
GrOsmoSDR
DEFAULT_MSG
GROSMOSDR_LIBRARIES
GROSMOSDR_INCLUDE_DIR
)
mark_as_advanced(
GrOsmoSDR_ROOT_DIR
GROSMOSDR_LIBRARIES
GROSMOSDR_INCLUDE_DIR
)

View File

@ -0,0 +1,97 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
#
# Provides the following imported target:
# Iio::ad9361
#
if(NOT COMMAND feature_summary)
include(FeatureSummary)
endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig)
endif()
pkg_check_modules(PC_LIBAD9361 libad9361)
if(NOT LIBAD9361_ROOT)
set(LIBAD9361_ROOT_USER_DEFINED /usr/local)
else()
set(LIBAD9361_ROOT_USER_DEFINED ${LIBAD9361_ROOT})
endif()
if(DEFINED ENV{LIBAD9361_ROOT})
set(LIBAD9361_ROOT_USER_DEFINED
${LIBAD9361_ROOT_USER_DEFINED}
$ENV{LIBAD9361_ROOT}
)
endif()
set(LIBAD9361_ROOT_USER_DEFINED
${LIBAD9361_ROOT_USER_DEFINED}
${CMAKE_INSTALL_PREFIX}
)
find_path(LIBAD9361_INCLUDE_DIRS
NAMES ad9361.h
HINTS ${PC_LIBAD9361_INCLUDEDIR}
PATHS ${LIBAD9361_ROOT_USER_DEFINED}/include
/usr/include
/usr/local/include
/opt/local/include
)
find_library(LIBAD9361_LIBRARIES
NAMES ad9361
HINTS ${PC_LIBAD9361_LIBDIR}
PATHS ${LIBAD9361_ROOT_USER_DEFINED}/lib
${LIBAD9361_ROOT_USER_DEFINED}/lib64
${GNSSSDR_LIB_PATHS}
/Library/Frameworks/ad9361.framework
)
if(LIBAD9361_LIBRARIES AND APPLE)
if(LIBAD9361_LIBRARIES MATCHES "framework")
set(LIBAD9361_LIBRARIES ${LIBAD9361_LIBRARIES}/ad9361)
endif()
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LIBAD9361 DEFAULT_MSG LIBAD9361_LIBRARIES LIBAD9361_INCLUDE_DIRS)
if(PC_LIBAD9361_VERSION)
set(LIBAD9361_VERSION ${PC_LIBAD9361_VERSION})
endif()
if(LIBAD9361_FOUND AND LIBAD9361_VERSION)
set_package_properties(LIBAD9361 PROPERTIES
DESCRIPTION "A library for interfacing with AD936X RF transceivers (found: v${LIBAD9361_VERSION})"
)
else()
set_package_properties(LIBAD9361 PROPERTIES
DESCRIPTION "A library for interfacing with AD936X RF transceivers"
)
endif()
set_package_properties(LIBAD9361 PROPERTIES
URL "https://github.com/analogdevicesinc/libad9361-iio"
)
if(LIBAD9361_FOUND AND NOT TARGET Iio::ad9361)
add_library(Iio::ad9361 SHARED IMPORTED)
set_target_properties(Iio::ad9361 PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${LIBAD9361_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${LIBAD9361_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${LIBAD9361_LIBRARIES}"
)
endif()
mark_as_advanced(LIBAD9361_LIBRARIES LIBAD9361_INCLUDE_DIRS)

View File

@ -0,0 +1,99 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
#
# Provides the following imported target:
# Iio::iio
#
if(NOT COMMAND feature_summary)
include(FeatureSummary)
endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig)
endif()
pkg_check_modules(PC_LIBIIO libiio)
if(NOT LIBIIO_ROOT)
set(LIBIIO_ROOT_USER_DEFINED /usr)
else()
set(LIBIIO_ROOT_USER_DEFINED ${LIBIIO_ROOT})
endif()
if(DEFINED ENV{LIBIIO_ROOT})
set(LIBIIO_ROOT_USER_DEFINED
${LIBIIO_ROOT_USER_DEFINED}
$ENV{LIBIIO_ROOT}
)
endif()
set(LIBIIO_ROOT_USER_DEFINED
${LIBIIO_ROOT_USER_DEFINED}
${CMAKE_INSTALL_PREFIX}
)
find_path(
LIBIIO_INCLUDE_DIRS
NAMES iio.h
HINTS ${PC_LIBIIO_INCLUDEDIR}
PATHS ${LIBIIO_ROOT_USER_DEFINED}/include
/usr/include
/usr/local/include
/opt/local/include
)
find_library(
LIBIIO_LIBRARIES
NAMES iio libiio.so.0
HINTS ${PC_LIBIIO_LIBDIR}
PATHS ${LIBIIO_ROOT_USER_DEFINED}/lib
${LIBIIO_ROOT_USER_DEFINED}/lib64
${GNSSSDR_LIB_PATHS}
/Library/Frameworks/iio.framework/
)
if(LIBIIO_LIBRARIES AND APPLE)
if(LIBIIO_LIBRARIES MATCHES "framework")
set(LIBIIO_LIBRARIES ${LIBIIO_LIBRARIES}/iio)
endif()
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LIBIIO DEFAULT_MSG LIBIIO_LIBRARIES LIBIIO_INCLUDE_DIRS)
if(PC_LIBIIO_VERSION)
set(LIBIIO_VERSION ${PC_LIBIIO_VERSION})
endif()
if(LIBIIO_FOUND AND LIBIIO_VERSION)
set_package_properties(LIBIIO PROPERTIES
DESCRIPTION "A library for interfacing with Linux IIO devices (found: v${LIBIIO_VERSION})"
)
else()
set_package_properties(LIBIIO PROPERTIES
DESCRIPTION "A library for interfacing with Linux IIO devices"
)
endif()
set_package_properties(LIBIIO PROPERTIES
URL "https://github.com/analogdevicesinc/libiio"
)
if(LIBIIO_FOUND AND NOT TARGET Iio::iio)
add_library(Iio::iio SHARED IMPORTED)
set_target_properties(Iio::iio PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${LIBIIO_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${LIBIIO_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${LIBIIO_LIBRARIES}"
)
endif()
mark_as_advanced(LIBIIO_LIBRARIES LIBIIO_INCLUDE_DIRS)

View File

@ -0,0 +1,150 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2022 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
# Find the libunwind library
#
# LIBUNWIND_FOUND - True if libunwind was found.
# LIBUNWIND_LIBRARIES - The libraries needed to use libunwind
# LIBUNWIND_INCLUDE_DIR - Location of libunwind.h
# INPUT (Optional):
# LIBUNWIND_ROOT - path where include + lib of libunwind install is located
if(NOT COMMAND feature_summary)
include(FeatureSummary)
endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
find_path(LIBUNWIND_INCLUDE_DIR
NAMES
libunwind.h
unwind.h
HINTS
/usr
/usr/local
/opt/local
PATH_SUFFIXES include
PATHS "${LIBUNWIND_ROOT}/include"
)
find_library(LIBUNWIND_GENERIC_LIBRARY
NAMES
libunwind
unwind
HINTS
/usr
/usr/local
/opt/local
PATH_SUFFIXES lib lib64
PATHS
"${LIBUNWIND_ROOT}/lib"
"${LIBUNWIND_ROOT}/lib64"
${GNSSSDR_LIB_PATHS}
)
if(LIBUNWIND_INCLUDE_DIR)
if(LIBUNWIND_GENERIC_LIBRARY)
set(LIBUNWIND_LIBRARIES ${LIBUNWIND_GENERIC_LIBRARY})
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64)")
set(LIBUNWIND_ARCH "aarch64")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
set(LIBUNWIND_ARCH "arm")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64)|(AMD64|amd64)|(corei7-64)")
set(LIBUNWIND_ARCH "x86_64")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$")
set(LIBUNWIND_ARCH "x86")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc64")
set(LIBUNWIND_ARCH "ppc64")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc")
set(LIBUNWIND_ARCH "ppc32")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
set(LIBUNWIND_ARCH "mips")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^hppa")
set(LIBUNWIND_ARCH "hppa")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^ia64")
set(LIBUNWIND_ARCH "ia64")
endif()
if(LIBUNWIND_ARCH)
find_library(LIBUNWIND_SPECIFIC_LIBRARY
NAMES
libunwind-${LIBUNWIND_ARCH}
"unwind-${LIBUNWIND_ARCH}"
HINTS
/usr
/usr/local
/opt/local
PATH_SUFFIXES lib lib64
PATHS "${LIBUNWIND_ROOT}"
)
if(NOT LIBUNWIND_SPECIFIC_LIBRARY)
message(STATUS " -- Failed to find unwind-${LIBUNWIND_ARCH}")
else()
set(LIBUNWIND_LIBRARIES ${LIBUNWIND_LIBRARIES} ${LIBUNWIND_SPECIFIC_LIBRARY})
endif()
endif()
endif()
else()
message(STATUS " -- Could NOT find libunwind.h")
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LIBUNWIND DEFAULT_MSG LIBUNWIND_INCLUDE_DIR)
if(LIBUNWIND_FOUND)
set(_Unwind_VERSION_HEADER ${LIBUNWIND_INCLUDE_DIR}/libunwind-common.h)
if(EXISTS ${_Unwind_VERSION_HEADER})
file(READ ${_Unwind_VERSION_HEADER} _Unwind_VERSION_CONTENTS)
string(REGEX REPLACE ".*#define UNW_VERSION_MAJOR[ \t]+([0-9]+).*" "\\1"
LIBUNWIND_VERSION_MAJOR "${_Unwind_VERSION_CONTENTS}")
string(REGEX REPLACE ".*#define UNW_VERSION_MINOR[ \t]+([0-9]+).*" "\\1"
LIBUNWIND_VERSION_MINOR "${_Unwind_VERSION_CONTENTS}")
string(REGEX REPLACE ".*#define UNW_VERSION_EXTRA[ \t]+([0-9]+).*" "\\1"
LIBUNWIND_VERSION_PATCH "${_Unwind_VERSION_CONTENTS}")
set(LIBUNWIND_VERSION ${LIBUNWIND_VERSION_MAJOR}.${LIBUNWIND_VERSION_MINOR})
if(CMAKE_MATCH_0)
# Third version component may be empty
set(LIBUNWIND_VERSION ${LIBUNWIND_VERSION}.${LIBUNWIND_VERSION_PATCH})
set(LIBUNWIND_VERSION_COMPONENTS 3)
else()
set(LIBUNWIND_VERSION_COMPONENTS 2)
endif()
endif()
endif()
if(LIBUNWIND_FOUND AND NOT TARGET Libunwind::libunwind)
if(LIBUNWIND_GENERIC_LIBRARY)
add_library(Libunwind::libunwind SHARED IMPORTED)
set_target_properties(Libunwind::libunwind PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${LIBUNWIND_GENERIC_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${LIBUNWIND_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${LIBUNWIND_LIBRARIES}"
)
else()
add_library(Libunwind::libunwind INTERFACE IMPORTED)
set_target_properties(Libunwind::libunwind PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${LIBUNWIND_INCLUDE_DIR}"
)
endif()
endif()
set_package_properties(LIBUNWIND PROPERTIES
URL "https://www.nongnu.org/libunwind/"
)
if(LIBUNWIND_VERSION)
set_package_properties(LIBUNWIND PROPERTIES
DESCRIPTION "Portable and efficient C programming interface to determine the call-chain of a program (found: v${LIBUNWIND_VERSION})"
)
else()
set_package_properties(LIBUNWIND PROPERTIES
DESCRIPTION "Portable and efficient C programming interface to determine the call-chain of a program"
)
endif()
mark_as_advanced(LIBUNWIND_LIBRARIES LIBUNWIND_INCLUDE_DIR)

View File

@ -0,0 +1,133 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
# - Find Log4cpp
# Find the native LOG4CPP includes and library
#
# LOG4CPP_INCLUDE_DIR - where to find LOG4CPP.h, etc.
# LOG4CPP_LIBRARIES - List of libraries when using LOG4CPP.
# LOG4CPP_FOUND - True if LOG4CPP found.
#
# Provides the following imported target:
# Log4cpp::log4cpp
#
if(NOT COMMAND feature_summary)
include(FeatureSummary)
endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig)
endif()
pkg_check_modules(PC_LOG4CPP log4cpp QUIET)
if(LOG4CPP_INCLUDE_DIR)
# Already in cache, be silent
set(LOG4CPP_FIND_QUIETLY TRUE)
endif()
if(LOG4CPP_ROOT)
set(LOG4CPP_ROOT_USER_PROVIDED ${LOG4CPP_ROOT})
else()
set(LOG4CPP_ROOT_USER_PROVIDED /usr)
endif()
if(DEFINED ENV{LOG4CPP_ROOT})
set(LOG4CPP_ROOT_USER_PROVIDED
${LOG4CPP_ROOT_USER_PROVIDED}
$ENV{LOG4CPP_ROOT}
)
endif()
set(LOG4CPP_ROOT_USER_PROVIDED
${LOG4CPP_ROOT_USER_PROVIDED}
${CMAKE_INSTALL_PREFIX}
)
find_path(LOG4CPP_INCLUDE_DIR log4cpp/Category.hh
${LOG4CPP_ROOT_USER_PROVIDED}/include
/usr/include
/usr/local/include
/opt/local/include
${PC_LOG4CPP_INCLUDEDIR}
)
if(LOG4CPP_INCLUDE_DIR)
file(STRINGS ${LOG4CPP_INCLUDE_DIR}/log4cpp/Priority.hh _log4cpp_Priority)
set(_log4cpp_cxx17 TRUE)
foreach(_loop_var IN LISTS _log4cpp_Priority)
string(STRIP "${_loop_var}" _file_line)
if("throw(std::invalid_argument);" STREQUAL "${_file_line}")
set(_log4cpp_cxx17 FALSE)
endif()
endforeach()
if(${_log4cpp_cxx17})
set(LOG4CPP_READY_FOR_CXX17 TRUE)
endif()
endif()
set(LOG4CPP_NAMES log4cpp)
find_library(LOG4CPP_LIBRARY
NAMES ${LOG4CPP_NAMES}
HINTS ${PC_LOG4CPP_LIBDIR}
PATHS ${LOG4CPP_ROOT_USER_PROVIDED}/lib
${LOG4CPP_ROOT_USER_PROVIDED}/lib64
${GNSSSDR_LIB_PATHS}
)
if(LOG4CPP_INCLUDE_DIR AND LOG4CPP_LIBRARY)
set(LOG4CPP_FOUND TRUE)
set(LOG4CPP_LIBRARIES ${LOG4CPP_LIBRARY} CACHE INTERNAL "" FORCE)
set(LOG4CPP_INCLUDE_DIRS ${LOG4CPP_INCLUDE_DIR} CACHE INTERNAL "" FORCE)
else()
set(LOG4CPP_FOUND FALSE CACHE INTERNAL "" FORCE)
set(LOG4CPP_LIBRARY "" CACHE INTERNAL "" FORCE)
set(LOG4CPP_LIBRARIES "" CACHE INTERNAL "" FORCE)
set(LOG4CPP_INCLUDE_DIR "" CACHE INTERNAL "" FORCE)
set(LOG4CPP_INCLUDE_DIRS "" CACHE INTERNAL "" FORCE)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LOG4CPP DEFAULT_MSG LOG4CPP_INCLUDE_DIRS LOG4CPP_LIBRARIES)
set_package_properties(LOG4CPP PROPERTIES
URL "https://log4cpp.sourceforge.net/"
)
if(LOG4CPP_FOUND AND PC_LOG4CPP_VERSION)
set(LOG4CPP_VERSION ${PC_LOG4CPP_VERSION})
endif()
if(LOG4CPP_FOUND AND LOG4CPP_VERSION)
if(LOG4CPP_READY_FOR_CXX17)
set_package_properties(LOG4CPP PROPERTIES
DESCRIPTION "Library of C++ classes for flexible logging (found: v${LOG4CPP_VERSION}, C++17-ready)"
)
else()
set_package_properties(LOG4CPP PROPERTIES
DESCRIPTION "Library of C++ classes for flexible logging (found: v${LOG4CPP_VERSION})"
)
endif()
else()
set_package_properties(LOG4CPP PROPERTIES
DESCRIPTION "Library of C++ classes for flexible logging"
)
endif()
if(LOG4CPP_FOUND AND NOT TARGET Log4cpp::log4cpp)
add_library(Log4cpp::log4cpp SHARED IMPORTED)
set_target_properties(Log4cpp::log4cpp PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${LOG4CPP_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${LOG4CPP_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${LOG4CPP_LIBRARIES}"
)
endif()
mark_as_advanced(LOG4CPP_LIBRARIES LOG4CPP_INCLUDE_DIRS)

View File

@ -1,41 +0,0 @@
# Tries to find libosmosdr.
#
# Usage of this module as follows:
#
# find_package(LibOsmoSDR)
#
#
# Variables defined by this module:
#
# LIBOSMOSDR_FOUND System has libosmosdr libs/headers
# LIBOSMOSDR_LIBRARIES The libosmosdr libraries
# LIBOSMOSDR_INCLUDE_DIR The location of libosmosdr headers
if(NOT LIBOSMOSDR_FOUND)
pkg_check_modules (LIBOSMOSDR_PKG libosmosdr)
find_path(LIBOSMOSDR_INCLUDE_DIR NAMES osmosdr.h
PATHS
${LIBOSMOSDR_PKG_INCLUDE_DIRS}
/usr/include
/usr/local/include
)
find_library(LIBOSMOSDR_LIBRARIES NAMES osmosdr
PATHS
${LIBOSMOSDR_PKG_LIBRARY_DIRS}
/usr/lib
/usr/local/lib
)
if(LIBOSMOSDR_INCLUDE_DIR AND LIBOSMOSDR_LIBRARIES)
set(LIBOSMOSDR_FOUND TRUE CACHE INTERNAL "libosmosdr found")
message(STATUS "Found libosmosdr: ${LIBOSMOSDR_INCLUDE_DIR}, ${LIBOSMOSDR_LIBRARIES}")
else(LIBOSMOSDR_INCLUDE_DIR AND LIBOSMOSDR_LIBRARIES)
set(LIBOSMOSDR_FOUND FALSE CACHE INTERNAL "libosmosdr found")
message(STATUS "libosmosdr not found.")
endif(LIBOSMOSDR_INCLUDE_DIR AND LIBOSMOSDR_LIBRARIES)
mark_as_advanced(LIBOSMOSDR_INCLUDE_DIR LIBOSMOSDR_LIBRARIES)
endif(NOT LIBOSMOSDR_FOUND)

View File

@ -0,0 +1,49 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
#
#
# Find MathJax package (version 2).
#
# A hint can be provided by defining MATHJAX2_ROOT
# (will succeed if ${MATHJAX2_ROOT}/MathJax.js is found).
#
# Alternatively, a path can be provided in MATHJAX2_USE_ROOT
# so that ${MATHJAX2_USE_ROOT}/MathJax.js is used without
# checking its existence.
# This path could be a URL, an absolute local path or
# a path relative to the generated HTML folder.
#
# Note that version 2 and 3 are incompatible
# and doxygen requires version 2.
# See: https://github.com/doxygen/doxygen/issues/7346
#
# Defined variables:
# - MATHJAX2_FOUND - True if MathJax found
# - MATHJAX2_JS_PATH - Path to MathJax.js file
# - MATHJAX2_PATH - Path to the MathJax root directory
if(DEFINED MATHJAX2_USE_ROOT)
set(MATHJAX2_FOUND TRUE)
set(MATHJAX2_PATH "${MATHJAX2_USE_ROOT}/")
set(MATHJAX2_JS_PATH "${MATHJAX2_USE_ROOT}/MathJax.js")
else()
find_file(MATHJAX2_JS_PATH
NAMES
MathJax.js
PATHS
"${MATHJAX2_ROOT}"
/usr/share/mathjax2/
/usr/share/javascript/mathjax/
/usr/local/share/javascript/mathjax/
)
get_filename_component(MATHJAX2_PATH ${MATHJAX2_JS_PATH} DIRECTORY)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(MATHJAX2 DEFAULT_MSG MATHJAX2_JS_PATH)
mark_as_advanced(MATHJAX2_JS_PATH)

View File

@ -0,0 +1,168 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
# FindMATIO
#
# Try to find MATIO library
#
# Once done this will define:
#
# MATIO_FOUND - True if MATIO found.
# MATIO_LIBRARIES - MATIO libraries.
# MATIO_INCLUDE_DIRS - where to find matio.h, etc..
# MATIO_VERSION_STRING - version number as a string (e.g.: "1.3.4")
#
# Provides the following imported target:
# Matio::matio
#
#=============================================================================
# Copyright 2015 Avtech Scientific <http://avtechscientific.com>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# * Neither the names of Kitware, Inc., the Insight Software Consortium,
# nor the names of their contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#=============================================================================
#
if(NOT COMMAND feature_summary)
include(FeatureSummary)
endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
if(NOT MATIO_ROOT)
set(MATIO_ROOT_USER_DEFINED /usr)
else()
set(MATIO_ROOT_USER_DEFINED ${MATIO_ROOT})
endif()
if(DEFINED ENV{MATIO_ROOT})
set(MATIO_ROOT_USER_DEFINED
${MATIO_ROOT_USER_DEFINED}
$ENV{MATIO_ROOT}
)
endif()
# Look for the header file.
find_path(MATIO_INCLUDE_DIR
NAMES matio.h
PATHS
${MATIO_ROOT_USER_DEFINED}/include
/usr/include
/usr/local/include
/opt/local/include
${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include
DOC "The MATIO include directory"
)
# Look for the library.
find_library(MATIO_LIBRARY
NAMES matio libmatio
PATHS
${MATIO_ROOT_USER_DEFINED}/lib
${MATIO_ROOT_USER_DEFINED}/lib64
${GNSSSDR_LIB_PATHS}
${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib
DOC "The MATIO library"
)
if(MATIO_INCLUDE_DIR)
# ---------------------------------------------------
# Extract version information from MATIO
# ---------------------------------------------------
# If the file is missing, set all values to 0
set(MATIO_MAJOR_VERSION 0)
set(MATIO_MINOR_VERSION 0)
set(MATIO_RELEASE_LEVEL 0)
# new versions of MATIO have `matio_pubconf.h`
if(EXISTS ${MATIO_INCLUDE_DIR}/matio_pubconf.h)
set(MATIO_CONFIG_FILE "matio_pubconf.h")
else()
set(MATIO_CONFIG_FILE "matioConfig.h")
endif()
if(MATIO_CONFIG_FILE)
# Read and parse MATIO config header file for version number
file(STRINGS "${MATIO_INCLUDE_DIR}/${MATIO_CONFIG_FILE}" _matio_HEADER_CONTENTS REGEX "#define MATIO_((MAJOR|MINOR)_VERSION)|(RELEASE_LEVEL) ")
foreach(line ${_matio_HEADER_CONTENTS})
if(line MATCHES "#define ([A-Z_]+) ([0-9]+)")
set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}")
endif()
endforeach()
unset(_matio_HEADER_CONTENTS)
endif()
set(MATIO_VERSION_STRING "${MATIO_MAJOR_VERSION}.${MATIO_MINOR_VERSION}.${MATIO_RELEASE_LEVEL}")
endif()
mark_as_advanced(MATIO_INCLUDE_DIR MATIO_LIBRARY)
# handle the QUIETLY and REQUIRED arguments and set MATIO_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(MATIO REQUIRED_VARS MATIO_LIBRARY MATIO_INCLUDE_DIR VERSION_VAR MATIO_VERSION_STRING)
if(MATIO_FOUND)
set(MATIO_LIBRARIES ${MATIO_LIBRARY})
set(MATIO_INCLUDE_DIRS ${MATIO_INCLUDE_DIR})
else()
set(MATIO_LIBRARIES)
set(MATIO_INCLUDE_DIRS)
endif()
if(MATIO_FOUND AND MATIO_VERSION_STRING)
set_package_properties(MATIO PROPERTIES
DESCRIPTION "MATLAB MAT File I/O Library (found: v${MATIO_VERSION_STRING})"
)
else()
set_package_properties(MATIO PROPERTIES
DESCRIPTION "MATLAB MAT File I/O Library"
)
endif()
set_package_properties(MATIO PROPERTIES
URL "https://github.com/tbeu/matio"
)
if(MATIO_FOUND AND NOT TARGET Matio::matio)
add_library(Matio::matio SHARED IMPORTED)
set_target_properties(Matio::matio PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${MATIO_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${MATIO_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${MATIO_LIBRARY}"
IMPORTED_IMPLIB "${MATIO_LIBRARY}"
)
endif()

View File

@ -0,0 +1,210 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
#
# - Try to find OpenCL
# This module tries to find an OpenCL implementation on your system. It supports
# AMD / ATI, Apple and NVIDIA implementations.
#
# Once done this will define
# OPENCL_FOUND - system has OpenCL
# OPENCL_INCLUDE_DIRS - the OpenCL include directory
# OPENCL_LIBRARIES - link these to use OpenCL
#
# WIN32 should work, but is untested
if(NOT COMMAND feature_summary)
include(FeatureSummary)
endif()
include(FindPackageHandleStandardArgs)
function(_FIND_OPENCL_VERSION)
include(CheckSymbolExists)
include(CMakePushCheckState)
set(CMAKE_REQUIRED_QUIET ${OPENCL_FIND_QUIETLY})
cmake_push_check_state()
foreach(VERSION "2_2" "2_1" "2_0" "1_2" "1_1" "1_0")
set(CMAKE_REQUIRED_INCLUDES "${OPENCL_INCLUDE_DIR}")
if(APPLE)
check_symbol_exists(
CL_VERSION_${VERSION}
"${OPENCL_INCLUDE_DIR}/Headers/cl.h"
OPENCL_VERSION_${VERSION}
)
else()
check_symbol_exists(
CL_VERSION_${VERSION}
"${OPENCL_INCLUDE_DIR}/CL/cl.h"
OPENCL_VERSION_${VERSION}
)
endif()
if(OPENCL_VERSION_${VERSION})
string(REPLACE "_" "." VERSION "${VERSION}")
set(OPENCL_VERSION_STRING ${VERSION} PARENT_SCOPE)
string(REGEX MATCHALL "[0-9]+" version_components "${VERSION}")
list(GET version_components 0 major_version)
list(GET version_components 1 minor_version)
set(OPENCL_VERSION_MAJOR ${major_version} PARENT_SCOPE)
set(OPENCL_VERSION_MINOR ${minor_version} PARENT_SCOPE)
break()
endif()
endforeach()
cmake_pop_check_state()
endfunction()
find_path(OPENCL_INCLUDE_DIR
NAMES
CL/cl.h OpenCL/cl.h
PATHS
ENV "PROGRAMFILES(X86)"
ENV AMDAPPSDKROOT
ENV INTELOCLSDKROOT
ENV NVSDKCOMPUTE_ROOT
ENV CUDA_PATH
ENV ATISTREAMSDKROOT
ENV OCL_ROOT
/usr/local/cuda/include
PATH_SUFFIXES
include
OpenCL/common/inc
"AMD APP/include"
)
find_path(_OPENCL_CPP_INCLUDE_DIRS
NAMES
CL/cl.hpp OpenCL/cl.hpp
PATHS
ENV "PROGRAMFILES(X86)"
ENV AMDAPPSDKROOT
ENV INTELOCLSDKROOT
ENV NVSDKCOMPUTE_ROOT
ENV CUDA_PATH
ENV ATISTREAMSDKROOT
ENV OCL_ROOT
/usr/local/cuda/include
PATH_SUFFIXES
include
OpenCL/common/inc
"AMD APP/include"
)
set(OPENCL_INCLUDE_DIRS ${OPENCL_INCLUDE_DIR})
if(_OPENCL_CPP_INCLUDE_DIRS)
set(OPENCL_HAS_CPP_BINDINGS TRUE)
list(APPEND OPENCL_INCLUDE_DIRS ${_OPENCL_CPP_INCLUDE_DIRS})
# This is often the same, so clean up
list(REMOVE_DUPLICATES OPENCL_INCLUDE_DIRS)
endif()
_find_opencl_version()
if(WIN32)
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
find_library(OPENCL_LIBRARY
NAMES OpenCL
PATHS
ENV "PROGRAMFILES(X86)"
ENV AMDAPPSDKROOT
ENV INTELOCLSDKROOT
ENV CUDA_PATH
ENV NVSDKCOMPUTE_ROOT
ENV ATISTREAMSDKROOT
ENV OCL_ROOT
PATH_SUFFIXES
"AMD APP/lib/x86"
lib/x86
lib/Win32
OpenCL/common/lib/Win32
)
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
find_library(OPENCL_LIBRARY
NAMES OpenCL
PATHS
ENV "PROGRAMFILES(X86)"
ENV AMDAPPSDKROOT
ENV INTELOCLSDKROOT
ENV CUDA_PATH
ENV NVSDKCOMPUTE_ROOT
ENV ATISTREAMSDKROOT
ENV OCL_ROOT
PATH_SUFFIXES
"AMD APP/lib/x86_64"
lib/x86_64
lib/x64
OpenCL/common/lib/x64
)
endif()
else()
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
find_library(OPENCL_LIBRARY
NAMES OpenCL
PATHS
ENV AMDAPPSDKROOT
ENV CUDA_PATH
ENV LD_LIBRARY_PATH
PATH_SUFFIXES
lib/x86
lib
)
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
find_library(OPENCL_LIBRARY
NAMES OpenCL
PATHS
ENV AMDAPPSDKROOT
ENV CUDA_PATH
ENV LD_LIBRARY_PATH
PATH_SUFFIXES
lib/x86_64
lib/x64
lib
lib64
)
endif()
endif()
set(OPENCL_LIBRARIES ${OPENCL_LIBRARY})
find_package_handle_standard_args(OPENCL DEFAULT_MSG OPENCL_LIBRARIES OPENCL_INCLUDE_DIRS)
mark_as_advanced(
OPENCL_INCLUDE_DIRS
OPENCL_LIBRARIES
)
set_package_properties(OPENCL PROPERTIES
URL "https://www.khronos.org/opencl/"
)
if(OPENCL_FOUND AND OPENCL_VERSION_STRING)
set_package_properties(OPENCL PROPERTIES
DESCRIPTION "Library for parallel programming (found: v${OPENCL_VERSION_STRING})"
)
else()
set_package_properties(OPENCL PROPERTIES
DESCRIPTION "Library for parallel programming"
)
endif()
if(OPENCL_FOUND AND NOT TARGET OpenCL::OpenCL)
if(OPENCL_LIBRARY MATCHES "/([^/]+)\\.framework$")
add_library(OpenCL::OpenCL INTERFACE IMPORTED)
set_target_properties(OpenCL::OpenCL PROPERTIES
INTERFACE_LINK_LIBRARIES "${OPENCL_LIBRARY}"
)
else()
add_library(OpenCL::OpenCL UNKNOWN IMPORTED)
set_target_properties(OpenCL::OpenCL PROPERTIES
IMPORTED_LOCATION "${OPENCL_LIBRARY}"
)
endif()
set_target_properties(OpenCL::OpenCL PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${OPENCL_INCLUDE_DIRS}"
)
endif()

View File

@ -1,33 +1,142 @@
FIND_PACKAGE(PkgConfig)
PKG_CHECK_MODULES(PC_ORC "orc-0.4 > 0.4.11")
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
FIND_PROGRAM(ORCC_EXECUTABLE orcc
HINTS ${PC_ORC_TOOLSDIR}
PATHS ${ORC_ROOT}/bin ${CMAKE_INSTALL_PREFIX}/bin)
if(DEFINED __INCLUDED_GNSSSDR_CMAKE_FIND_ORC)
return()
endif()
set(__INCLUDED_GNSSSDR_CMAKE_FIND_ORC TRUE)
FIND_PATH(ORC_INCLUDE_DIR NAMES orc/orc.h
HINTS ${PC_ORC_INCLUDEDIR}
PATHS ${ORC_ROOT}/include/orc-0.4 ${CMAKE_INSTALL_PREFIX}/include/orc-0.4)
if(NOT COMMAND feature_summary)
include(FeatureSummary)
endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
FIND_PATH(ORC_LIBRARY_DIR NAMES ${CMAKE_SHARED_LIBRARY_PREFIX}orc-0.4${CMAKE_SHARED_LIBRARY_SUFFIX}
HINTS ${PC_ORC_LIBDIR}
PATHS ${ORC_ROOT}/lib${LIB_SUFFIX} ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig)
endif()
FIND_LIBRARY(ORC_LIB orc-0.4
HINTS ${PC_ORC_LIBRARY_DIRS}
PATHS ${ORC_ROOT}/lib${LIB_SUFFIX} ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
pkg_check_modules(PC_ORC "orc-0.4 > 0.4.22")
LIST(APPEND ORC_LIBRARY
${ORC_LIB}
if(NOT ORC_ROOT)
set(ORC_ROOT_USER_PROVIDED /usr/local)
else()
set(ORC_ROOT_USER_PROVIDED ${ORC_ROOT})
endif()
if(DEFINED ENV{ORC_ROOT})
set(ORC_ROOT_USER_PROVIDED
${ORC_ROOT_USER_PROVIDED}
$ENV{ORC_ROOT}
)
endif()
set(ORC_ROOT_USER_PROVIDED
${ORC_ROOT_USER_PROVIDED}
${CMAKE_INSTALL_PREFIX}
)
if(PC_ORC_TOOLSDIR)
set(ORC_ROOT_USER_PROVIDED
${ORC_ROOT_USER_PROVIDED}
${PC_ORC_TOOLSDIR}
)
endif()
find_program(ORCC_EXECUTABLE orcc
HINTS ${ORC_ROOT_USER_PROVIDED}/bin
PATHS /usr/bin
/usr/local/bin
/opt/local/bin
)
find_path(ORC_INCLUDE_DIR
NAMES orc/orc.h
HINTS ${PC_ORC_INCLUDEDIR}
PATHS ${ORC_ROOT_USER_PROVIDED}/include
/usr/include
/usr/local/include
/opt/local/include
PATH_SUFFIXES orc-0.4
)
SET(ORC_INCLUDE_DIRS ${ORC_INCLUDE_DIR})
SET(ORC_LIBRARIES ${ORC_LIBRARY})
SET(ORC_LIBRARY_DIRS ${ORC_LIBRARY_DIR})
find_path(ORC_LIBRARY_DIR
NAMES ${CMAKE_SHARED_LIBRARY_PREFIX}orc-0.4${CMAKE_SHARED_LIBRARY_SUFFIX}
HINTS ${PC_ORC_LIBDIR}
PATHS ${ORC_ROOT_USER_PROVIDED}/lib
${ORC_ROOT_USER_PROVIDED}/lib64
${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
${GNSSSDR_LIB_PATHS}
)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ORC "orc files" ORC_LIBRARY ORC_INCLUDE_DIR ORCC_EXECUTABLE)
find_library(ORC_LIB orc-0.4
HINTS ${PC_ORC_LIBRARY_DIRS}
PATHS ${ORC_ROOT_USER_PROVIDED}/lib
${ORC_ROOT_USER_PROVIDED}/lib64
${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
${GNSSSDR_LIB_PATHS}
)
mark_as_advanced(ORC_INCLUDE_DIR ORC_LIBRARY ORCC_EXECUTABLE)
find_library(ORC_LIBRARY_STATIC ${CMAKE_STATIC_LIBRARY_PREFIX}orc-0.4${CMAKE_STATIC_LIBRARY_SUFFIX}
HINTS ${PC_ORC_LIBRARY_DIRS}
PATHS ${ORC_ROOT}/lib
${ORC_ROOT}/lib64
${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
${ORC_ROOT_USER_PROVIDED}/lib
${ORC_ROOT_USER_PROVIDED}/lib64
/usr/lib
/usr/lib64
/usr/lib/x86_64-linux-gnu
/usr/lib/i386-linux-gnu
/usr/lib/arm-linux-gnueabihf
/usr/lib/arm-linux-gnueabi
/usr/lib/aarch64-linux-gnu
/usr/lib/mipsel-linux-gnu
/usr/lib/mips-linux-gnu
/usr/lib/mips64el-linux-gnuabi64
/usr/lib/powerpc-linux-gnu
/usr/lib/powerpc64-linux-gnu
/usr/lib/powerpc64le-linux-gnu
/usr/lib/hppa-linux-gnu
/usr/lib/s390x-linux-gnu
/usr/lib/riscv64-linux-gnu
/usr/lib/loongarch64-linux-gnu
/usr/local/lib
/usr/local/lib64
/opt/local/lib
)
if(PC_ORC_VERSION)
set(ORC_VERSION ${PC_ORC_VERSION})
endif()
list(APPEND ORC_LIBRARY ${ORC_LIB})
set(ORC_INCLUDE_DIRS ${ORC_INCLUDE_DIR})
set(ORC_LIBRARIES ${ORC_LIBRARY})
set(ORC_LIBRARY_DIRS ${ORC_LIBRARY_DIR})
set(ORC_LIBRARIES_STATIC ${ORC_LIBRARY_STATIC})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(ORC "orc files" ORC_LIBRARY ORC_INCLUDE_DIR ORCC_EXECUTABLE)
set_package_properties(ORC PROPERTIES
URL "https://gstreamer.freedesktop.org/modules/orc.html"
)
if(ORC_FOUND AND ORC_VERSION)
set_package_properties(ORC PROPERTIES
DESCRIPTION "The Optimized Inner Loops Runtime Compiler (found: v${ORC_VERSION})"
)
else()
set_package_properties(ORC PROPERTIES
DESCRIPTION "The Optimized Inner Loops Runtime Compiler"
)
endif()
mark_as_advanced(ORC_INCLUDE_DIR ORC_LIBRARY ORCC_EXECUTABLE)

View File

@ -1,25 +0,0 @@
# - Try to find OpenBLAS library (not headers!)
#
# The following environment variable is optionally searched
# OPENBLAS_HOME: Base directory where all OpenBlas components are found
SET(OPEN_BLAS_SEARCH_PATHS /lib/
/lib64/
/usr/lib
/usr/lib64
/usr/local/lib
/usr/local/lib64
/opt/OpenBLAS/lib
/opt/local/lib
/usr/lib/openblas-base
$ENV{OPENBLAS_HOME}/lib
)
FIND_LIBRARY(OPENBLAS NAMES openblas PATHS ${OPEN_BLAS_SEARCH_PATHS})
IF (OPENBLAS)
SET(OPENBLAS_FOUND ON)
MESSAGE(STATUS "Found OpenBLAS")
ENDIF (OPENBLAS)
MARK_AS_ADVANCED(OPENBLAS)

View File

@ -1,99 +0,0 @@
#
# This file taken from FindOpenCL project @ http://gitorious.com/findopencl
#
# - Try to find OpenCL
# This module tries to find an OpenCL implementation on your system. It supports
# AMD / ATI, Apple and NVIDIA implementations, but shoudl work, too.
#
# Once done this will define
# OPENCL_FOUND - system has OpenCL
# OPENCL_INCLUDE_DIRS - the OpenCL include directory
# OPENCL_LIBRARIES - link these to use OpenCL
#
# WIN32 should work, but is untested
FIND_PACKAGE( PackageHandleStandardArgs )
SET (OPENCL_VERSION_STRING "0.1.0")
SET (OPENCL_VERSION_MAJOR 0)
SET (OPENCL_VERSION_MINOR 1)
SET (OPENCL_VERSION_PATCH 0)
IF (APPLE)
FIND_LIBRARY(OPENCL_LIBRARIES OpenCL DOC "OpenCL lib for OSX")
FIND_PATH(OPENCL_INCLUDE_DIRS OpenCL/cl.h DOC "Include for OpenCL on OSX")
FIND_PATH(_OPENCL_CPP_INCLUDE_DIRS OpenCL/cl.hpp DOC "Include for OpenCL CPP bindings on OSX")
ELSE (APPLE)
IF (WIN32)
FIND_PATH(OPENCL_INCLUDE_DIRS CL/cl.h)
FIND_PATH(_OPENCL_CPP_INCLUDE_DIRS CL/cl.hpp)
# The AMD SDK currently installs both x86 and x86_64 libraries
# This is only a hack to find out architecture
IF( ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "AMD64" )
SET(OPENCL_LIB_DIR "$ENV{ATISTREAMSDKROOT}/lib/x86_64")
SET(OPENCL_LIB_DIR "$ENV{ATIINTERNALSTREAMSDKROOT}/lib/x86_64")
ELSE (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "AMD64")
SET(OPENCL_LIB_DIR "$ENV{ATISTREAMSDKROOT}/lib/x86")
SET(OPENCL_LIB_DIR "$ENV{ATIINTERNALSTREAMSDKROOT}/lib/x86")
ENDIF( ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "AMD64" )
# find out if the user asked for a 64-bit build, and use the corresponding
# 64 or 32 bit NVIDIA library paths to the search:
STRING(REGEX MATCH "Win64" ISWIN64 ${CMAKE_GENERATOR})
IF("${ISWIN64}" STREQUAL "Win64")
FIND_LIBRARY(OPENCL_LIBRARIES OpenCL.lib ${OPENCL_LIB_DIR} $ENV{CUDA_LIB_PATH} $ENV{CUDA_PATH}/lib/x64)
ELSE("${ISWIN64}" STREQUAL "Win64")
FIND_LIBRARY(OPENCL_LIBRARIES OpenCL.lib ${OPENCL_LIB_DIR} $ENV{CUDA_LIB_PATH} $ENV{CUDA_PATH}/lib/Win32)
ENDIF("${ISWIN64}" STREQUAL "Win64")
GET_FILENAME_COMPONENT(_OPENCL_INC_CAND ${OPENCL_LIB_DIR}/../../include ABSOLUTE)
# On Win32 search relative to the library
FIND_PATH(OPENCL_INCLUDE_DIRS CL/cl.h PATHS "${_OPENCL_INC_CAND}" $ENV{CUDA_INC_PATH} $ENV{CUDA_PATH}/include)
FIND_PATH(_OPENCL_CPP_INCLUDE_DIRS CL/cl.hpp PATHS "${_OPENCL_INC_CAND}" $ENV{CUDA_INC_PATH} $ENV{CUDA_PATH}/include)
ELSE (WIN32)
# Unix style platforms
FIND_LIBRARY(OPENCL_LIBRARIES OpenCL
ENV LD_LIBRARY_PATH
)
GET_FILENAME_COMPONENT(OPENCL_LIB_DIR ${OPENCL_LIBRARIES} PATH)
GET_FILENAME_COMPONENT(_OPENCL_INC_CAND ${OPENCL_LIB_DIR}/../../include ABSOLUTE)
# The AMD SDK currently does not place its headers
# in /usr/include, therefore also search relative
# to the library
FIND_PATH(OPENCL_INCLUDE_DIRS CL/cl.h PATHS ${_OPENCL_INC_CAND} "/usr/local/cuda/include")
FIND_PATH(_OPENCL_CPP_INCLUDE_DIRS CL/cl.hpp PATHS ${_OPENCL_INC_CAND} "/usr/local/cuda/include")
ENDIF (WIN32)
ENDIF (APPLE)
FIND_PACKAGE_HANDLE_STANDARD_ARGS( OpenCL DEFAULT_MSG OPENCL_LIBRARIES OPENCL_INCLUDE_DIRS )
IF( _OPENCL_CPP_INCLUDE_DIRS )
SET( OPENCL_HAS_CPP_BINDINGS TRUE )
LIST( APPEND OPENCL_INCLUDE_DIRS ${_OPENCL_CPP_INCLUDE_DIRS} )
# This is often the same, so clean up
LIST( REMOVE_DUPLICATES OPENCL_INCLUDE_DIRS )
ENDIF( _OPENCL_CPP_INCLUDE_DIRS )
MARK_AS_ADVANCED(
OPENCL_INCLUDE_DIRS
)
IF( OPENCL_INCLUDE_DIRS AND OPENCL_LIBRARIES )
SET( OPENCL_FOUND TRUE )
add_definitions( -DOPENCL=1 )
ELSE( OPENCL_INCLUDE_DIRS AND OPENCL_LIBRARIES )
SET( OPENCL_FOUND FALSE )
add_definitions( -DOPENCL=0 )
ENDIF( OPENCL_INCLUDE_DIRS AND OPENCL_LIBRARIES )

View File

@ -0,0 +1,161 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2006 Frederic Heem, <frederic.heem@telsey.it>
# SPDX-License-Identifier: BSD-3-Clause
# - Find pcap
# Find the PCAP includes and library
# https://www.tcpdump.org/
#
# The environment variable PCAPDIR allows to specify where to find
# libpcap in non standard location.
#
# PCAP_INCLUDE_DIRS - where to find pcap.h, etc.
# PCAP_LIBRARIES - List of libraries when using pcap.
# PCAP_FOUND - True if pcap found.
#
# Provides the following imported target:
# Pcap::pcap
#
if(NOT COMMAND feature_summary)
include(FeatureSummary)
endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig)
endif()
pkg_check_modules(PC_PCAP libpcap QUIET)
if(NOT PCAP_ROOT)
set(PCAP_ROOT_USER_PROVIDED /usr)
else()
set(PCAP_ROOT_USER_PROVIDED ${PCAP_ROOT})
endif()
if(DEFINED ENV{PCAP_ROOT})
set(PCAP_ROOT_USER_PROVIDED
${PCAP_ROOT_USER_PROVIDED}
$ENV{PCAP_ROOT}
)
endif()
if(DEFINED ENV{PCAPDIR})
set(PCAP_ROOT_USER_PROVIDED
${PCAP_ROOT_USER_PROVIDED}
$ENV{PCAPDIR})
endif()
if(DEFINED ENV{PCAPDIR})
find_path(PCAP_INCLUDE_DIR
NAMES
pcap/pcap.h
pcap.h
HINTS
${PC_PCAP_INCLUDEDIR}
PATHS
${PCAP_ROOT_USER_PROVIDED}
${PCAP_ROOT_USER_PROVIDED}/include
NO_DEFAULT_PATH
)
find_library(PCAP_LIBRARY
NAMES
pcap
HINTS
${PC_PCAP_LIBDIR}
PATHS
${PCAP_ROOT_USER_PROVIDED}
${PCAP_ROOT_USER_PROVIDED}/lib
NO_DEFAULT_PATH
)
else()
find_path(PCAP_INCLUDE_DIR
NAMES
pcap/pcap.h
pcap.h
HINTS
${PC_PCAP_INCLUDEDIR}
PATHS
${PCAP_ROOT_USER_PROVIDED}/include
/usr/include
/usr/local/include
/opt/local/include
)
find_library(PCAP_LIBRARY
NAMES
pcap
HINTS
${PC_PCAP_LIBDIR}
PATHS
${PCAP_ROOT_USER_PROVIDED}/lib
${GNSSSDR_LIB_PATHS}
)
endif()
set(PCAP_INCLUDE_DIRS ${PCAP_INCLUDE_DIR})
set(PCAP_LIBRARIES ${PCAP_LIBRARY})
if(PCAP_INCLUDE_DIRS)
message(STATUS "Pcap include dirs set to ${PCAP_INCLUDE_DIRS}")
else()
message(STATUS "Pcap include dirs cannot be found.")
endif()
if(PCAP_LIBRARIES)
message(STATUS "Pcap library set to ${PCAP_LIBRARIES}")
else()
message(STATUS "Pcap library cannot be found.")
endif()
#Functions
include(CheckFunctionExists)
set(CMAKE_REQUIRED_INCLUDES ${PCAP_INCLUDE_DIRS})
set(CMAKE_REQUIRED_LIBRARIES ${PCAP_LIBRARIES})
check_function_exists("pcap_breakloop" HAVE_PCAP_BREAKLOOP)
check_function_exists("pcap_datalink_name_to_val" HAVE_PCAP_DATALINK_NAME_TO_VAL)
check_function_exists("pcap_datalink_val_to_name" HAVE_PCAP_DATALINK_VAL_TO_NAME)
check_function_exists("pcap_findalldevs" HAVE_PCAP_FINDALLDEVS)
check_function_exists("pcap_freecode" HAVE_PCAP_FREECODE)
check_function_exists("pcap_get_selectable_fd" HAVE_PCAP_GET_SELECTABLE_FD)
check_function_exists("pcap_lib_version" HAVE_PCAP_LIB_VERSION)
check_function_exists("pcap_list_datalinks" HAVE_PCAP_LIST_DATALINKS)
check_function_exists("pcap_open_dead" HAVE_PCAP_OPEN_DEAD)
check_function_exists("pcap_set_datalink" HAVE_PCAP_SET_DATALINK)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(PCAP DEFAULT_MSG PCAP_INCLUDE_DIRS PCAP_LIBRARIES)
if(PCAP_FOUND AND PC_PCAP_VERSION)
set(PCAP_VERSION ${PC_PCAP_VERSION})
endif()
set_package_properties(PCAP PROPERTIES
URL "https://www.tcpdump.org"
)
if(PCAP_FOUND AND PCAP_VERSION)
set_package_properties(PCAP PROPERTIES
DESCRIPTION "A portable C/C++ library for network traffic capture (found: v${PCAP_VERSION})"
)
else()
set_package_properties(PCAP PROPERTIES
DESCRIPTION "A portable C/C++ library for network traffic capture"
)
endif()
if(PCAP_FOUND AND NOT TARGET Pcap::pcap)
add_library(Pcap::pcap SHARED IMPORTED)
set_target_properties(Pcap::pcap PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${PCAP_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${PCAP_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${PCAP_LIBRARIES}"
)
endif()
mark_as_advanced(PCAP_LIBRARIES PCAP_INCLUDE_DIRS)

View File

@ -0,0 +1,120 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
# Find the pugixml XML parsing library.
#
# Sets the usual variables expected for find_package scripts:
#
# PUGIXML_INCLUDE_DIR - header location
# PUGIXML_LIBRARIES - library to link against
# PUGIXML_FOUND - true if pugixml was found.
#
# Provides the following imported target:
# Pugixml::pugixml
#
if(NOT COMMAND feature_summary)
include(FeatureSummary)
endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig)
endif()
pkg_check_modules(PC_PUGIXML pugixml QUIET)
if(NOT PUGIXML_ROOT)
set(PUGIXML_ROOT_USER_DEFINED /usr)
else()
set(PUGIXML_ROOT_USER_DEFINED ${PUGIXML_ROOT})
endif()
if(DEFINED ENV{PUGIXML_ROOT})
set(PUGIXML_ROOT_USER_DEFINED
${PUGIXML_ROOT_USER_DEFINED}
$ENV{PUGIXML_ROOT}
)
endif()
if(PUGIXML_HOME)
set(PUGIXML_ROOT_USER_DEFINED
${PUGIXML_ROOT_USER_DEFINED}
${PUGIXML_HOME}
)
endif()
find_path(PUGIXML_INCLUDE_DIR
NAMES pugixml.hpp
HINTS ${PC_PUGIXML_INCLUDEDIR}
PATHS ${PUGIXML_ROOT_USER_DEFINED}/include
${PUGIXML_ROOT_USER_DEFINED}/include/pugixml-${PC_PUGIXML_VERSION}
${PUGIXML_ROOT_USER_DEFINED}/include/pugixml-1.9
/usr/include
/usr/local/include
/usr/local/include/pugixml-${PC_PUGIXML_VERSION}
/usr/local/include/pugixml-1.9
/opt/local/include
)
find_library(PUGIXML_LIBRARY
NAMES pugixml
HINTS ${PC_PUGIXML_LIBDIR}
PATHS ${PUGIXML_ROOT_USER_DEFINED}/lib
${PUGIXML_ROOT_USER_DEFINED}/lib64
${PUGIXML_ROOT_USER_DEFINED}/lib/pugixml-${PC_PUGIXML_VERSION}
${PUGIXML_ROOT_USER_DEFINED}/lib64/pugixml-${PC_PUGIXML_VERSION}
${PUGIXML_ROOT_USER_DEFINED}}/lib/pugixml-1.9
${PUGIXML_ROOT_USER_DEFINED}/lib64/pugixml-1.9
${GNSSSDR_LIB_PATHS}
/usr/local/lib/pugixml-${PC_PUGIXML_VERSION}
/usr/local/lib/pugixml-1.9
)
# Support the REQUIRED and QUIET arguments, and set PUGIXML_FOUND if found.
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(PUGIXML DEFAULT_MSG PUGIXML_LIBRARY
PUGIXML_INCLUDE_DIR)
if(PUGIXML_FOUND)
set(PUGIXML_LIBRARIES ${PUGIXML_LIBRARY})
if(NOT PUGIXML_FIND_QUIETLY)
message(STATUS "PugiXML include = ${PUGIXML_INCLUDE_DIR}")
message(STATUS "PugiXML library = ${PUGIXML_LIBRARY}")
endif()
if(PC_PUGIXML_VERSION)
set(PUGIXML_VERSION ${PC_PUGIXML_VERSION})
endif()
else()
message(STATUS "PugiXML not found.")
endif()
set_package_properties(PUGIXML PROPERTIES
URL "https://pugixml.org/"
)
if(PUGIXML_FOUND AND PUGIXML_VERSION)
set_package_properties(PUGIXML PROPERTIES
DESCRIPTION "Light-weight, simple and fast XML parser for C++ (found: v${PUGIXML_VERSION})"
)
else()
set_package_properties(PUGIXML PROPERTIES
DESCRIPTION "Light-weight, simple and fast XML parser for C++"
)
endif()
mark_as_advanced(PUGIXML_LIBRARY PUGIXML_INCLUDE_DIR)
if(PUGIXML_FOUND AND NOT TARGET Pugixml::pugixml)
add_library(Pugixml::pugixml SHARED IMPORTED)
set_target_properties(Pugixml::pugixml PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${PUGIXML_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${PUGIXML_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${PUGIXML_LIBRARY}"
)
endif()

View File

@ -0,0 +1,101 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
#
# Provides the following imported target:
# Gnuradio::teleorbit
#
if(NOT COMMAND feature_summary)
include(FeatureSummary)
endif()
if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig)
endif()
pkg_check_modules(PC_TELEORBIT teleorbit QUIET)
if(NOT TELEORBIT_ROOT)
set(TELEORBIT_ROOT_USER_DEFINED /usr/local)
else()
set(TELEORBIT_ROOT_USER_DEFINED ${TELEORBIT_ROOT})
endif()
if(DEFINED ENV{TELEORBIT_ROOT})
set(TELEORBIT_ROOT_USER_DEFINED
${TELEORBIT_ROOT_USER_DEFINED}
$ENV{TELEORBIT_ROOT}
)
endif()
set(TELEORBIT_ROOT_USER_DEFINED
${TELEORBIT_ROOT_USER_DEFINED}
${CMAKE_INSTALL_PREFIX}
)
find_path(TELEORBIT_INCLUDE_DIRS
NAMES teleorbit/api.h
HINTS ${PC_TELEORBIT_INCLUDEDIR}
PATH_SUFFIXES gnuradio
PATHS ${TELEORBIT_ROOT_USER_DEFINED}/include
/usr/include
/usr/local/include
/opt/local/include
)
find_library(TELEORBIT_LIBRARIES
NAMES gnuradio-teleorbit
HINTS ${PC_TELEORBIT_LIBDIR}
PATHS ${TELEORBIT_ROOT_USER_DEFINED}/lib
${TELEORBIT_ROOT_USER_DEFINED}/lib64
/usr/lib
/usr/lib64
/usr/local/lib
/usr/local/lib64
/opt/local/lib
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(TELEORBIT DEFAULT_MSG TELEORBIT_LIBRARIES TELEORBIT_INCLUDE_DIRS)
if(PC_TELEORBIT_VERSION)
set(TELEORBIT_VERSION ${PC_TELEORBIT_VERSION})
endif()
if(NOT TELEORBIT_VERSION)
set(OLD_PACKAGE_VERSION ${PACKAGE_VERSION})
unset(PACKAGE_VERSION)
list(GET TELEORBIT_LIBRARIES 0 FIRST_DIR)
get_filename_component(TELEORBIT_LIBRARIES_DIR ${FIRST_DIR} DIRECTORY)
if(EXISTS ${TELEORBIT_LIBRARIES_DIR}/cmake/teleorbit/TeleorbitConfigVersion.cmake)
include(${TELEORBIT_LIBRARIES_DIR}/cmake/teleorbit/TeleorbitConfigVersion.cmake)
endif()
if(PACKAGE_VERSION)
set(TELEORBIT_VERSION ${PACKAGE_VERSION})
endif()
set(PACKAGE_VERSION ${OLD_PACKAGE_VERSION})
endif()
if(TELEORBIT_FOUND AND TELEORBIT_VERSION)
set_package_properties(TELEORBIT PROPERTIES
DESCRIPTION "The Teleorbit's Flexiband GNU Radio block (found: v${TELEORBIT_VERSION})"
)
else()
set_package_properties(TELEORBIT PROPERTIES
DESCRIPTION "The Teleorbit's Flexiband GNU Radio block."
)
endif()
if(TELEORBIT_FOUND AND NOT TARGET Gnuradio::teleorbit)
add_library(Gnuradio::teleorbit SHARED IMPORTED)
set_target_properties(Gnuradio::teleorbit PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${TELEORBIT_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${TELEORBIT_INCLUDE_DIRS};${TELEORBIT_INCLUDE_DIRS}/teleorbit"
INTERFACE_LINK_LIBRARIES "${TELEORBIT_LIBRARIES}"
)
endif()
mark_as_advanced(TELEORBIT_LIBRARIES TELEORBIT_INCLUDE_DIRS)

View File

@ -1,29 +0,0 @@
INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(PC_TELEORBIT teleorbit)
FIND_PATH(
TELEORBIT_INCLUDE_DIRS
NAMES teleorbit/api.h
HINTS $ENV{TELEORBIT_DIR}/include
${PC_TELEORBIT_INCLUDEDIR}
PATHS ${CMAKE_INSTALL_PREFIX}/include
/usr/local/include
/usr/include
)
FIND_LIBRARY(
TELEORBIT_LIBRARIES
NAMES gnuradio-teleorbit
HINTS $ENV{TELEORBIT_DIR}/lib
${PC_TELEORBIT_LIBDIR}
PATHS ${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
/usr/local/lib
/usr/local/lib64
/usr/lib
/usr/lib64
)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TELEORBIT DEFAULT_MSG TELEORBIT_LIBRARIES TELEORBIT_INCLUDE_DIRS)
MARK_AS_ADVANCED(TELEORBIT_LIBRARIES TELEORBIT_INCLUDE_DIRS)

View File

@ -1,30 +1,114 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
#
# Provides the following imported target:
# Uhd::uhd
#
########################################################################
# Find the library for the USRP Hardware Driver
########################################################################
if(NOT COMMAND feature_summary)
include(FeatureSummary)
endif()
INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(PC_UHD uhd)
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
FIND_PATH(
UHD_INCLUDE_DIRS
if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig)
endif()
pkg_check_modules(PC_UHD uhd)
if(NOT UHD_ROOT)
set(UHD_ROOT_USER_PROVIDED /usr/local)
else()
set(UHD_ROOT_USER_PROVIDED ${UHD_ROOT})
endif()
if(GNURADIO_INSTALL_PREFIX)
set(UHD_ROOT_USER_PROVIDED
${UHD_ROOT_USER_PROVIDED}
${GNURADIO_INSTALL_PREFIX}
)
endif()
if(DEFINED ENV{UHD_ROOT})
set(UHD_ROOT_USER_PROVIDED
${UHD_ROOT_USER_PROVIDED}
$ENV{UHD_ROOT}
)
endif()
if(DEFINED ENV{UHD_DIR})
set(UHD_ROOT_USER_PROVIDED
${UHD_ROOT_USER_PROVIDED}
$ENV{UHD_DIR}
)
endif()
find_path(UHD_INCLUDE_DIRS
NAMES uhd/config.hpp
HINTS $ENV{UHD_DIR}/include
${PC_UHD_INCLUDEDIR}
PATHS /usr/local/include
HINTS ${PC_UHD_INCLUDEDIR}
PATHS ${UHD_ROOT_USER_PROVIDED}/include
/usr/include
${GNURADIO_INSTALL_PREFIX}/include
/usr/local/include
/opt/local/include
)
FIND_LIBRARY(
UHD_LIBRARIES
find_library(UHD_LIBRARIES
NAMES uhd
HINTS $ENV{UHD_DIR}/lib
${PC_UHD_LIBDIR}
PATHS /usr/local/lib
/usr/lib
${GNURADIO_INSTALL_PREFIX}/lib
HINTS ${PC_UHD_LIBDIR}
PATHS ${UHD_ROOT_USER_PROVIDED}/lib
${UHD_ROOT_USER_PROVIDED}/lib64
${GNSSSDR_LIB_PATHS}
)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(UHD DEFAULT_MSG UHD_LIBRARIES UHD_INCLUDE_DIRS)
MARK_AS_ADVANCED(UHD_LIBRARIES UHD_INCLUDE_DIRS)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(UHD DEFAULT_MSG UHD_LIBRARIES UHD_INCLUDE_DIRS)
if(PC_UHD_VERSION)
set(UHD_VERSION ${PC_UHD_VERSION})
endif()
if(NOT PC_UHD_VERSION)
set(OLD_PACKAGE_VERSION ${PACKAGE_VERSION})
unset(PACKAGE_VERSION)
list(GET UHD_LIBRARIES 0 FIRST_DIR)
get_filename_component(UHD_LIBRARIES_DIR ${FIRST_DIR} DIRECTORY)
if(EXISTS ${UHD_LIBRARIES_DIR}/cmake/uhd/UHDConfigVersion.cmake)
include(${UHD_LIBRARIES_DIR}/cmake/uhd/UHDConfigVersion.cmake)
endif()
if(PACKAGE_VERSION)
set(UHD_VERSION ${PACKAGE_VERSION})
endif()
set(PACKAGE_VERSION ${OLD_PACKAGE_VERSION})
endif()
set_package_properties(UHD PROPERTIES
URL "https://www.ettus.com/sdr-software/uhd-usrp-hardware-driver/"
)
if(UHD_FOUND AND UHD_VERSION)
set_package_properties(UHD PROPERTIES
DESCRIPTION "USRP Hardware Driver (found: v${UHD_VERSION})"
)
else()
set_package_properties(UHD PROPERTIES
DESCRIPTION "USRP Hardware Driver"
)
endif()
if(UHD_FOUND AND NOT TARGET Uhd::uhd)
add_library(Uhd::uhd SHARED IMPORTED)
set_target_properties(Uhd::uhd PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${UHD_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${UHD_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${UHD_LIBRARIES}"
)
endif()
mark_as_advanced(UHD_LIBRARIES UHD_INCLUDE_DIRS)

View File

@ -0,0 +1,124 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
#
# Provides the following imported target:
# Volk::volk
#
########################################################################
# Find VOLK (Vector-Optimized Library of Kernels)
########################################################################
if(NOT COMMAND feature_summary)
include(FeatureSummary)
endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig)
endif()
pkg_check_modules(PC_VOLK volk QUIET)
if(NOT VOLK_ROOT)
set(VOLK_ROOT_USER_PROVIDED /usr)
else()
set(VOLK_ROOT_USER_PROVIDED ${VOLK_ROOT})
endif()
if(DEFINED ENV{VOLK_ROOT})
set(VOLK_ROOT_USER_PROVIDED
${VOLK_ROOT_USER_PROVIDED}
$ENV{VOLK_ROOT}
)
endif()
if(DEFINED ENV{VOLK_DIR})
set(VOLK_ROOT_USER_PROVIDED
${VOLK_ROOT_USER_PROVIDED}
$ENV{VOLK_DIR}
)
endif()
set(VOLK_ROOT_USER_PROVIDED
${VOLK_ROOT_USER_PROVIDED}
${CMAKE_INSTALL_PREFIX}
)
find_path(VOLK_INCLUDE_DIRS
NAMES volk/volk.h
HINTS ${PC_VOLK_INCLUDEDIR}
PATHS ${VOLK_ROOT_USER_PROVIDED}/include
/usr/include
/usr/local/include
/opt/local/include
)
find_library(VOLK_LIBRARIES
NAMES volk
HINTS ${PC_VOLK_LIBDIR}
PATHS ${VOLK_ROOT_USER_PROVIDED}/lib
${VOLK_ROOT_USER_PROVIDED}/lib64
${GNSSSDR_LIB_PATHS}
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(VOLK DEFAULT_MSG VOLK_LIBRARIES VOLK_INCLUDE_DIRS)
if(PC_VOLK_VERSION)
set(VOLK_VERSION ${PC_VOLK_VERSION})
endif()
if(NOT VOLK_VERSION)
set(OLD_PACKAGE_VERSION ${PACKAGE_VERSION})
unset(PACKAGE_VERSION)
list(GET VOLK_LIBRARIES 0 FIRST_DIR)
get_filename_component(VOLK_LIB_DIR ${FIRST_DIR} DIRECTORY)
if(EXISTS ${VOLK_LIB_DIR}/cmake/volk/VolkConfigVersion.cmake)
set(PACKAGE_FIND_VERSION_MAJOR 0)
include(${VOLK_LIB_DIR}/cmake/volk/VolkConfigVersion.cmake)
endif()
if(PACKAGE_VERSION)
set(VOLK_VERSION ${PACKAGE_VERSION})
endif()
set(PACKAGE_VERSION ${OLD_PACKAGE_VERSION})
endif()
set_package_properties(VOLK PROPERTIES
URL "https://www.libvolk.org"
)
if(VOLK_FOUND AND VOLK_VERSION)
set_package_properties(VOLK PROPERTIES
DESCRIPTION "Vector-Optimized Library of Kernels (found: v${VOLK_VERSION})"
)
else()
set_package_properties(VOLK PROPERTIES
DESCRIPTION "Vector-Optimized Library of Kernels"
)
endif()
mark_as_advanced(VOLK_LIBRARIES VOLK_INCLUDE_DIRS VOLK_VERSION)
if(NOT ORC_FOUND)
find_package(ORC QUIET)
endif()
if(ORC_LIBRARIES_STATIC)
set(VOLK_LINK_LIBRARIES ${VOLK_LIBRARIES} ${ORC_LIBRARIES_STATIC})
set(VOLK_INCLUDE_DIRS ${VOLK_INCLUDE_DIRS} ${ORC_INCLUDE_DIRS})
else()
set(VOLK_LINK_LIBRARIES ${VOLK_LIBRARIES})
endif()
if(VOLK_FOUND AND NOT TARGET Volk::volk)
add_library(Volk::volk SHARED IMPORTED)
set_target_properties(Volk::volk PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${VOLK_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${VOLK_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${VOLK_LINK_LIBRARIES}"
)
endif()

View File

@ -0,0 +1,107 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
#
# Provides the following imported target:
# Volkgnsssdr::volkgnsssdr
#
########################################################################
# Find VOLK (Vector-Optimized Library of Kernels) GNSS-SDR library
########################################################################
if(NOT COMMAND feature_summary)
include(FeatureSummary)
endif()
if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig)
endif()
pkg_check_modules(PC_VOLK_GNSSSDR QUIET volk_gnsssdr)
if(NOT VOLKGNSSSDR_ROOT)
set(VOLKGNSSSDR_ROOT_USER_PROVIDED /usr/local)
else()
set(VOLKGNSSSDR_ROOT_USER_PROVIDED ${VOLKGNSSSDR_ROOT})
endif()
if(DEFINED ENV{VOLKGNSSSDR_ROOT})
set(VOLKGNSSSDR_ROOT_USER_PROVIDED
${VOLKGNSSSDR_ROOT_USER_PROVIDED}
$ENV{VOLKGNSSSDR_ROOT}
)
endif()
if(DEFINED ENV{VOLK_GNSSSDR_DIR})
set(VOLKGNSSSDR_ROOT_USER_PROVIDED
${VOLKGNSSSDR_ROOT_USER_PROVIDED}
$ENV{VOLK_GNSSSDR_DIR}
)
endif()
if(GNURADIO_INSTALL_PREFIX)
set(VOLKGNSSSDR_ROOT_USER_PROVIDED
${VOLKGNSSSDR_ROOT_USER_PROVIDED}
${GNURADIO_INSTALL_PREFIX}
)
endif()
find_path(VOLK_GNSSSDR_INCLUDE_DIRS
NAMES volk_gnsssdr/volk_gnsssdr.h
HINTS ${PC_VOLK_GNSSSDR_INCLUDEDIR}
PATHS ${VOLKGNSSSDR_ROOT_USER_PROVIDED}/include
/usr/include
/usr/local/include
/opt/local/include
)
find_library(VOLK_GNSSSDR_LIBRARIES
NAMES volk_gnsssdr
HINTS ${PC_VOLK_GNSSSDR_LIBDIR}
PATHS ${VOLKGNSSSDR_ROOT_USER_PROVIDED}/lib
${VOLKGNSSSDR_ROOT_USER_PROVIDED}/lib64
/usr/lib
/usr/lib64
/usr/local/lib
/usr/local/lib64
/opt/local/lib
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(VOLKGNSSSDR DEFAULT_MSG VOLK_GNSSSDR_LIBRARIES VOLK_GNSSSDR_INCLUDE_DIRS)
mark_as_advanced(VOLK_GNSSSDR_LIBRARIES VOLK_GNSSSDR_INCLUDE_DIRS)
if(PC_VOLK_GNSSSDR_VERSION)
set(VOLKGNSSSDR_VERSION ${PC_VOLK_GNSSSDR_VERSION})
endif()
if(VOLKGNSSSDR_FOUND AND VOLKGNSSSDR_VERSION)
set_package_properties(VOLKGNSSSDR PROPERTIES
DESCRIPTION "Vector-Optimized Library of Kernels for GNSS-SDR (found: v${VOLKGNSSSDR_VERSION})."
)
else()
set_package_properties(VOLKGNSSSDR PROPERTIES
DESCRIPTION "Vector-Optimized Library of Kernels for GNSS-SDR."
)
endif()
if(NOT ORC_FOUND)
find_package(ORC QUIET)
endif()
if(ORC_FOUND)
set(VOLK_GNSSSDR_LINK_LIBRARIES ${VOLK_GNSSSDR_LIBRARIES} ${ORC_LIBRARIES})
set(VOLK_GNSSSDR_INCLUDE_DIRS ${VOLK_GNSSSDR_INCLUDE_DIRS} ${ORC_INCLUDE_DIRS})
else()
set(VOLK_GNSSSDR_LINK_LIBRARIES ${VOLK_GNSSSDR_LIBRARIES})
endif()
if(VOLKGNSSSDR_FOUND AND NOT TARGET Volkgnsssdr::volkgnsssdr)
add_library(Volkgnsssdr::volkgnsssdr SHARED IMPORTED)
set_target_properties(Volkgnsssdr::volkgnsssdr PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${VOLK_GNSSSDR_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${VOLK_GNSSSDR_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${VOLK_GNSSSDR_LINK_LIBRARIES}"
)
endif()

View File

@ -1,34 +0,0 @@
########################################################################
# Find VOLK (Vector-Optimized Library of Kernels)
########################################################################
INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(PC_VOLK volk)
FIND_PATH(
VOLK_INCLUDE_DIRS
NAMES volk/volk.h
HINTS $ENV{VOLK_DIR}/include
${PC_VOLK_INCLUDEDIR}
PATHS /usr/local/include
/usr/include
${GNURADIO_INSTALL_PREFIX}/include
)
FIND_LIBRARY(
VOLK_LIBRARIES
NAMES volk
HINTS $ENV{VOLK_DIR}/lib
${PC_VOLK_LIBDIR}
PATHS /usr/local/lib
/usr/local/lib64
/usr/lib
/usr/lib64
${GNURADIO_INSTALL_PREFIX}/lib
)
set(VOLK_VERSION ${PC_VOLK_VERSION})
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(VOLK DEFAULT_MSG VOLK_LIBRARIES VOLK_INCLUDE_DIRS)
MARK_AS_ADVANCED(VOLK_LIBRARIES VOLK_INCLUDE_DIRS VOLK_VERSION)

View File

@ -1,32 +0,0 @@
########################################################################
# Find VOLK (Vector-Optimized Library of Kernels) GNSS-SDR library
########################################################################
INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(PC_VOLK_GNSSSDR volk_gnsssdr)
FIND_PATH(
VOLK_GNSSSDR_INCLUDE_DIRS
NAMES volk_gnsssdr/volk_gnsssdr.h
HINTS $ENV{VOLK_GNSSSDR_DIR}/include
${PC_VOLK_GNSSSDR_INCLUDEDIR}
PATHS /usr/local/include
/usr/include
${GNURADIO_INSTALL_PREFIX}/include
)
FIND_LIBRARY(
VOLK_GNSSSDR_LIBRARIES
NAMES volk_gnsssdr
HINTS $ENV{VOLK_GNSSSDR_DIR}/lib
${PC_VOLK_GNSSSDR_LIBDIR}
PATHS /usr/local/lib
/usr/local/lib64
/usr/lib
/usr/lib64
${GNURADIO_INSTALL_PREFIX}/lib
)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(VOLK_GNSSSDR DEFAULT_MSG VOLK_GNSSSDR_LIBRARIES VOLK_GNSSSDR_INCLUDE_DIRS)
MARK_AS_ADVANCED(VOLK_GNSSSDR_LIBRARIES VOLK_GNSSSDR_INCLUDE_DIRS)

View File

@ -0,0 +1,61 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2023 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
#
# Provides the following imported target:
# ZeroMQ::ZeroMQ
#
if(NOT COMMAND feature_summary)
include(FeatureSummary)
endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
if(NOT PKG_CONFIG_FOUND)
include(FindPkgConfig)
endif()
find_package(PkgConfig)
pkg_check_modules(PC_ZEROMQ "libzmq")
find_path(ZEROMQ_INCLUDE_DIRS
NAMES zmq.hpp
HINTS ${PC_ZEROMQ_INCLUDE_DIR} ${CMAKE_INSTALL_PREFIX}/include
PATHS /usr/local/include /usr/include /opt/local/include
)
find_library(ZEROMQ_LIBRARIES
NAMES zmq libzmq.so.5 ${ZEROMQ_LIBRARY_NAME}
HINTS ${PC_ZEROMQ_LIBDIR} ${CMAKE_INSTALL_PREFIX}/lib ${CMAKE_INSTALL_PREFIX}/lib64
PATHS ${GNSSSDR_LIB_PATHS}
)
include(FindPackageHandleStandardArgs)
# This is just to detect presence, include files not required
find_package_handle_standard_args(ZEROMQ DEFAULT_MSG ZEROMQ_LIBRARIES)
mark_as_advanced(ZEROMQ_LIBRARIES ZEROMQ_INCLUDE_DIRS)
set_package_properties(ZEROMQ PROPERTIES URL "https://zeromq.org/")
if(PC_ZEROMQ_VERSION)
set_package_properties(ZEROMQ PROPERTIES
DESCRIPTION "An open-source universal messaging library (found: v${PC_ZEROMQ_VERSION})"
)
else()
set_package_properties(ZEROMQ PROPERTIES
DESCRIPTION "An open-source universal messaging library"
)
endif()
if(ZEROMQ_FOUND AND ZEROMQ_INCLUDE_DIRS AND NOT TARGET ZeroMQ::ZeroMQ)
add_library(ZeroMQ::ZeroMQ INTERFACE IMPORTED)
set_target_properties(ZeroMQ::ZeroMQ PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${ZEROMQ_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${ZEROMQ_LIBRARIES}"
)
endif()

View File

@ -1,323 +0,0 @@
# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors)
#
# This file is part of GNSS-SDR.
#
# GNSS-SDR is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GNSS-SDR is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
#
#if(DEFINED __INCLUDED_GNSS_SDR_PACKAGE_CMAKE)
# return()
#endif()
#set( __INCLUDED_GNSS_SDR_PACKAGE_CMAKE TRUE)
#set the cpack generator based on the platform type
if(CPACK_GENERATOR)
#already set by user
elseif(APPLE)
set(PACKAGE_GENERATOR "DragNDrop")
set(PACKAGE_SOURCE_GENERATOR "TGZ;ZIP")
elseif(UNIX)
if(${LINUX_DISTRIBUTION} MATCHES "Debian" OR ${LINUX_DISTRIBUTION} MATCHES "Ubuntu")
set (PACKAGE_GENERATOR "DEB")
endif(${LINUX_DISTRIBUTION} MATCHES "Debian" OR ${LINUX_DISTRIBUTION} MATCHES "Ubuntu")
if(${LINUX_DISTRIBUTION} MATCHES "Red Hat" OR ${LINUX_DISTRIBUTION} MATCHES "Fedora")
set (PACKAGE_GENERATOR "RPM")
endif(${LINUX_DISTRIBUTION} MATCHES "Red Hat" OR ${LINUX_DISTRIBUTION} MATCHES "Fedora")
set (PACKAGE_SOURCE_GENERATOR "TGZ;ZIP")
else()
set(PACKAGE_GENERATOR "TGZ")
set(PACKAGE_SOURCE_GENERATOR "TGZ")
endif()
# used package generators
set (CPACK_GENERATOR "${PACKAGE_GENERATOR}" CACHE STRING "List of binary package generators (CPack).")
set (CPACK_SOURCE_GENERATOR "${PACKAGE_SOURCE_GENERATOR}" CACHE STRING "List of source package generators (CPack).")
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/cmake/Packaging/postinst.in" "${CMAKE_CURRENT_BINARY_DIR}/scripts/postinst" @ONLY IMMEDIATE)
FILE(COPY ${CMAKE_CURRENT_BINARY_DIR}/scripts/postinst DESTINATION ${CMAKE_CURRENT_BINARY_DIR} FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/cmake/Packaging/prerm.in" "${CMAKE_CURRENT_BINARY_DIR}/scripts/prerm" @ONLY IMMEDIATE)
FILE(COPY ${CMAKE_CURRENT_BINARY_DIR}/scripts/prerm DESTINATION ${CMAKE_CURRENT_BINARY_DIR} FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
########################################################################
# Setup CPack
########################################################################
set(CPACK_PACKAGE_DESCRIPTION "GNSS Software Defined Receiver")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Global Navigation Satellite Systems Software Defined Receiver written in C++." )
set(CPACK_PACKAGE_VENDOR "Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)")
set(CPACK_PACKAGE_NAME "gnss-sdr")
set(CPACK_PACKAGE_VERSION "${VERSION}")
set(CPACK_PACKAGE_CONTACT "Carles Fernandez-Prades <carles.fernandez@cttc.cat>")
set(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/docs/doxygen/images/gnss-sdr_logo_round.png")
set(CPACK_PACKAGE_VERSION_MAJOR "${VERSION_INFO_MAJOR_VERSION}")
set(CPACK_PACKAGE_VERSION_MINOR "${VERSION_INFO_API_COMPAT}")
set(CPACK_PACKAGE_VERSION_PATCH "${VERSION_INFO_MINOR_VERSION}")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")
set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_SOURCE_DIR}/README.md")
set(CPACK_SET_DESTDIR "OFF")
set(CPACK_STRIP_FILES "ON")
# Debian-specific settings
set(CPACK_DEBIAN_PACKAGE_SECTION "science")
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "cmake (>= 2.8), libstdc++6 (>= 4.7), libc6 (>= 2.13), libboost-dev (>= 1.45), libboost-date-time-dev (>= 1.45), libboost-system-dev (>= 1.45), libboost-filesystem-dev (>= 1.45), libboost-thread-dev (>= 1.45), libboost-serialization-dev (>= 1.45), libboost-program-options-dev (>= 1.45), libboost-test-dev (>= 1.45), libuhd-dev (>= 3.7), gnuradio-dev (>= 3.7.3), gr-osmosdr (>= 0.1.1), liblog4cpp5-dev (>= 1.0), libarmadillo-dev (>= 1:4.200.0), liblapack-dev (>= 3.4), libblas-dev (>= 1.2), gfortran (>= 1:4.7), libssl-dev (>= 1.0), libgflags-dev (>= 2.0), libgoogle-glog-dev (>= 0.3.3), libgtest-dev (>= 1.7)")
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "GNSS Software Defined Receiver written in C++.
Global Navigation Satellite Systems receiver defined by software.
It performs all the signal processing from raw signal samples up to the
computation of the Position-Velocity-Time solution, including
code and phase observables. It is able to work with raw data files or,
if there is computational power enough, in real time with suitable
radio frequency front-ends. This software is mainly developed at CTTC
(Centre Tecnologic de Telecomunicacions de Catalunya, http://www.cttc.es)
with contributions from around the world.
More info at http://gnss-sdr.org")
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_BINARY_DIR}/postinst;${CMAKE_CURRENT_BINARY_DIR}/prerm")
# system/architecture
if (APPLE)
set (CPACK_PACKAGE_ARCHITECTURE darwin)
else(APPLE)
string (TOLOWER "${CMAKE_SYSTEM_NAME}" CPACK_SYSTEM_NAME)
if(CMAKE_CXX_FLAGS MATCHES "-m32")
set (CPACK_PACKAGE_ARCHITECTURE i386)
else(CMAKE_CXX_FLAGS MATCHES "-m32")
execute_process (
COMMAND dpkg --print-architecture
RESULT_VARIABLE RV
OUTPUT_VARIABLE CPACK_PACKAGE_ARCHITECTURE
)
if(RV EQUAL 0)
string (STRIP "${CPACK_PACKAGE_ARCHITECTURE}" CPACK_PACKAGE_ARCHITECTURE)
else(RV EQUAL 0)
execute_process (COMMAND uname -m OUTPUT_VARIABLE CPACK_PACKAGE_ARCHITECTURE)
if(CPACK_PACKAGE_ARCHITECTURE MATCHES "x86_64")
set (CPACK_PACKAGE_ARCHITECTURE amd64)
endif(CPACK_PACKAGE_ARCHITECTURE MATCHES "x86_64")
if(CPACK_PACKAGE_ARCHITECTURE MATCHES "i386")
set (CPACK_PACKAGE_ARCHITECTURE i386)
endif(CPACK_PACKAGE_ARCHITECTURE MATCHES "i386")
endif(RV EQUAL 0)
endif(CMAKE_CXX_FLAGS MATCHES "-m32")
endif(APPLE)
if(NOT CPACK_PACKAGE_ARCHITECTURE)
# Code from https://qt.gitorious.org/qt/qtbase/source/src/corelib/global/qprocessordetection.h
set(archdetect_c_code "
#if defined(__arm__) || defined(__TARGET_ARCH_ARM) || defined(_M_ARM) || defined(__arm64__)
#if defined(__arm64__)
#error cmake_ARCH arm64
#endif
#if defined(__arm__) || defined(__TARGET_ARCH_ARM)
#if defined(__ARM_ARCH_8__) \\
|| defined(__ARM_ARCH_8A__) \\
|| defined(__ARM_ARCH_8R__) \\
|| (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 8)
#error cmake_ARCH armv8
#elif defined(__ARM_ARCH_7__) \\
|| defined(__ARM_ARCH_7A__) \\
|| defined(__ARM_ARCH_7R__) \\
|| defined(__ARM_ARCH_7M__) \\
|| (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 7)
#error cmake_ARCH armv7
#elif defined(__ARM_ARCH_6__) \\
|| defined(__ARM_ARCH_6J__) \\
|| defined(__ARM_ARCH_6T2__) \\
|| defined(__ARM_ARCH_6Z__) \\
|| defined(__ARM_ARCH_6K__) \\
|| defined(__ARM_ARCH_6ZK__) \\
|| defined(__ARM_ARCH_6M__) \\
|| (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 6)
#error cmake_ARCH armv6
#elif defined(__ARM_ARCH_5TEJ__) \\
|| (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 5)
#error cmake_ARCH armv5
#else
#error cmake_ARCH arm
#endif
#elif defined(__i386) || defined(__i386__) || defined(_M_IX86)
#error cmake_ARCH i386
#elif defined(__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(_M_X64)
#error cmake_ARCH x86_64
#elif defined(__ia64) || defined(__ia64__) || defined(_M_IA64)
#error cmake_ARCH ia64
#elif defined(__ppc__) || defined(__ppc) || defined(__powerpc__) \\
|| defined(_ARCH_COM) || defined(_ARCH_PWR) || defined(_ARCH_PPC) \\
|| defined(_M_MPPC) || defined(_M_PPC)
#if defined(__ppc64__) || defined(__powerpc64__) || defined(__64BIT__)
#error cmake_ARCH ppc64
#else
#error cmake_ARCH ppc
#endif
#endif
#error cmake_ARCH unknown
")
function(target_architecture output_var)
if(APPLE AND CMAKE_OSX_ARCHITECTURES)
# On OS X we use CMAKE_OSX_ARCHITECTURES *if* it was set
# On OS X 10.6+ the default is x86_64 if the CPU supports it, i386 otherwise.
foreach(osx_arch ${CMAKE_OSX_ARCHITECTURES})
if("${osx_arch}" STREQUAL "i386")
set(osx_arch_i386 TRUE)
elseif("${osx_arch}" STREQUAL "x86_64")
set(osx_arch_x86_64 TRUE)
else()
message(FATAL_ERROR "Invalid OS X arch name: ${osx_arch}")
endif()
endforeach()
# Now add all the architectures in our normalized order
if(osx_arch_i386)
list(APPEND ARCH i386)
endif()
if(osx_arch_x86_64)
list(APPEND ARCH x86_64)
endif()
else()
file(WRITE "${CMAKE_BINARY_DIR}/arch.c" "${archdetect_c_code}")
enable_language(C)
# Detect the architecture in a rather creative way...
# This compiles a small C program which is a series of ifdefs that selects a
# particular #error preprocessor directive whose message string contains the
# target architecture. The program will always fail to compile (both because
# file is not a valid C program, and obviously because of the presence of the
# #error preprocessor directives... but by exploiting the preprocessor in this
# way, we can detect the correct target architecture even when cross-compiling,
# since the program itself never needs to be run (only the compiler/preprocessor)
try_run(
run_result_unused
compile_result_unused
"${CMAKE_BINARY_DIR}"
"${CMAKE_BINARY_DIR}/arch.c"
COMPILE_OUTPUT_VARIABLE ARCH
CMAKE_FLAGS CMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}
)
# Parse the architecture name from the compiler output
string(REGEX MATCH "cmake_ARCH ([a-zA-Z0-9_]+)" ARCH "${ARCH}")
# Get rid of the value marker leaving just the architecture name
string(REPLACE "cmake_ARCH " "" ARCH "${ARCH}")
# If we are compiling with an unknown architecture this variable should
# already be set to "unknown" but in the case that it's empty (i.e. due
# to a typo in the code), then set it to unknown
if (NOT ARCH)
set(ARCH unknown)
endif()
endif()
set(${output_var} "${ARCH}" PARENT_SCOPE)
endfunction()
# Set target architectures
target_architecture(CMAKE_TARGET_ARCHITECTURES)
endif(NOT CPACK_PACKAGE_ARCHITECTURE)
if(APPLE)
list(LENGTH CMAKE_TARGET_ARCHITECTURES cmake_target_arch_len)
if(NOT "${cmake_target_arch_len}" STREQUAL "1")
set(CMAKE_TARGET_ARCHITECTURE_UNIVERSAL TRUE)
set(CMAKE_TARGET_ARCHITECTURE_CODE "universal")
else(NOT "${cmake_target_arch_len}" STREQUAL "1")
set(CMAKE_TARGET_ARCHITECTURE_UNIVERSAL FALSE)
set(CMAKE_TARGET_ARCHITECTURE_CODE "${CMAKE_TARGET_ARCHITECTURES}")
endif(NOT "${cmake_target_arch_len}" STREQUAL "1")
endif(APPLE)
# source package settings
#set (CPACK_SOURCE_TOPLEVEL_TAG "source")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
set(CPACK_SOURCE_IGNORE_FILES "/\\\\.git/;\\\\.gitignore;/\\\\data/*;/\\\\install/*;/\\\\thirdparty/;/\\\\docs/html/;/\\\\docs/latex;\\\\.pdf;\\\\.project$;\\\\.DS_Store;\\\\.swp$;\\\\.#;/#;\\\\.*~;cscope\\\\.*;/[Bb]uild[.+-_a-zA-Z0-9]*/")
# default binary package settings
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY TRUE)
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}")
if(CPACK_PACKAGE_ARCHITECTURE)
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}_${CPACK_PACKAGE_ARCHITECTURE}")
endif(CPACK_PACKAGE_ARCHITECTURE)
if(CPACK_GENERATOR STREQUAL "DEB")
configure_file("${CMAKE_SOURCE_DIR}/cmake/Packaging/fixup_deb_permissions.sh.in" "${CMAKE_CURRENT_BINARY_DIR}/fixup_deb_permissions.sh" @ONLY IMMEDIATE)
configure_file("${CMAKE_SOURCE_DIR}/cmake/Packaging/fixup_deb_permissions.sh.in" "${CMAKE_CURRENT_BINARY_DIR}/scripts/fixup_deb_permissions.sh" @ONLY IMMEDIATE)
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/scripts/fixup_deb_permissions.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
# Write license
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/copyright"
"Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: gnss-sdr
Source: git://github.com/gnss-sdr/gnss-sdr
Files: *
Copyright: Copyright 2014 ${CPACK_PACKAGE_CONTACT}
License: GPL-3+
This program is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later
version.
.
This program is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU General Public License for more
details.
.
You should have received a copy of the GNU General Public
License along with this package; if not, write to the Free
Software Foundation, Inc., 51 Franklin St, Fifth Floor,
Boston, MA 02110-1301 USA
.
On Debian systems, the full text of the GNU General Public
License version 3 can be found in the file
`/usr/share/common-licenses/GPL-3'.
Files: src/core/libs/supl/*
Copyright: 2007 Tatu Mannisto
License: BSD
Files: src/core/libs/INIReader.*
Copyright: 2009 Brush Technologies
License: BSD-3-clause
Files: src/core/libs/ini.*
Copyright: 2009 Brush Technologies
License: BSD-3-clause")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/copyright"
DESTINATION "share/doc/${CPACK_PACKAGE_NAME}")
execute_process(COMMAND gzip -9 -c ${CMAKE_SOURCE_DIR}/docs/changelog
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} OUTPUT_FILE "${CMAKE_BINARY_DIR}/changelog.gz")
execute_process(COMMAND gzip -9 -c ${CMAKE_SOURCE_DIR}/docs/changelog.Debian
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} OUTPUT_FILE "${CMAKE_BINARY_DIR}/changelog.Debian.gz")
install(FILES "${CMAKE_BINARY_DIR}/changelog.gz" "${CMAKE_BINARY_DIR}/changelog.Debian.gz" DESTINATION "share/doc/${CPACK_PACKAGE_NAME}")
endif(CPACK_GENERATOR STREQUAL "DEB")
include(CPack)

View File

@ -0,0 +1,210 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
if(DEFINED __INCLUDED_GNSSSDR_BUILD_TYPES_CMAKE)
return()
endif()
set(__INCLUDED_GNSSSDR_BUILD_TYPES_CMAKE TRUE)
# Standard CMake Build Types and their basic CFLAGS:
# - None: nothing set
# - Debug: -O2 -g
# - Release: -O3
# - RelWithDebInfo: -O3 -g
# - MinSizeRel: -Os
# Additional Build Types, defined below:
# - NoOptWithASM: -O0 -g -save-temps
# - O2WithASM: -O2 -g -save-temps
# - O3WithASM: -O3 -g -save-temps
# Defines the list of acceptable cmake build types. When adding a new
# build type below, make sure to add it to this list.
list(APPEND AVAIL_BUILDTYPES
None Debug Release RelWithDebInfo MinSizeRel
Coverage NoOptWithASM O2WithASM O3WithASM ASAN
)
########################################################################
# GNSSSDR_CHECK_BUILD_TYPE(build type)
#
# Use this to check that the build type set in CMAKE_BUILD_TYPE on the
# commandline is one of the valid build types used by this project. It
# checks the value set in the cmake interface against the list of
# known build types in AVAIL_BUILDTYPES. If the build type is found,
# the function exits immediately. If nothing is found by the end of
# checking all available build types, we exit with a soft warning, listing
# the available build types, and setting the build type to None.
########################################################################
function(GNSSSDR_CHECK_BUILD_TYPE settype)
string(TOUPPER ${settype} _settype)
foreach(btype ${AVAIL_BUILDTYPES})
string(TOUPPER ${btype} _btype)
if(${_settype} STREQUAL ${_btype})
return() # found it; exit cleanly
endif()
endforeach()
# Build type not found; warn out at set it to None
message(STATUS "Warning: Build type '${settype}' not valid, must be one of: ${AVAIL_BUILDTYPES}.")
message(STATUS "Setting the build type to 'None'")
set(CMAKE_BUILD_TYPE "None" PARENT_SCOPE)
endfunction()
########################################################################
# For GCC and Clang, we can set a build type:
#
# -DCMAKE_BUILD_TYPE=Coverage
#
# This type uses no optimization (-O0), outputs debug symbols (-g) and
# outputs all intermediary files the build system produces, including
# all assembly (.s) files. Look in the build directory for these
# files.
# NOTE: This is not defined on Windows systems.
########################################################################
if(NOT WIN32)
set(CMAKE_CXX_FLAGS_COVERAGE "-Wall -pedantic -pthread -g -O0 -fprofile-arcs -ftest-coverage" CACHE STRING
"Flags used by the C++ compiler during Coverage builds." FORCE)
set(CMAKE_C_FLAGS_COVERAGE "-Wall -pedantic -pthread -g -O0 -fprofile-arcs -ftest-coverage" CACHE STRING
"Flags used by the C compiler during Coverage builds." FORCE)
set(CMAKE_EXE_LINKER_FLAGS_COVERAGE
"-W" CACHE STRING
"Flags used for linking binaries during Coverage builds." FORCE)
set(CMAKE_SHARED_LINKER_FLAGS_COVERAGE
"-W" CACHE STRING
"Flags used by the shared lib linker during Coverage builds." FORCE)
mark_as_advanced(
CMAKE_CXX_FLAGS_COVERAGE
CMAKE_C_FLAGS_COVERAGE
CMAKE_EXE_LINKER_FLAGS_COVERAGE
CMAKE_SHARED_LINKER_FLAGS_COVERAGE)
endif()
########################################################################
# For GCC and Clang, we can set a build type:
#
# -DCMAKE_BUILD_TYPE=NoOptWithASM
#
# This type uses no optimization (-O0), outputs debug symbols (-g) and
# outputs all intermediary files the build system produces, including
# all assembly (.s) files. Look in the build directory for these
# files.
# NOTE: This is not defined on Windows systems.
########################################################################
if(NOT WIN32)
set(CMAKE_CXX_FLAGS_NOOPTWITHASM "-Wall -save-temps -g -O0" CACHE STRING
"Flags used by the C++ compiler during NoOptWithASM builds." FORCE)
set(CMAKE_C_FLAGS_NOOPTWITHASM "-Wall -save-temps -g -O0" CACHE STRING
"Flags used by the C compiler during NoOptWithASM builds." FORCE)
set(CMAKE_EXE_LINKER_FLAGS_NOOPTWITHASM
"-W" CACHE STRING
"Flags used for linking binaries during NoOptWithASM builds." FORCE)
set(CMAKE_SHARED_LINKER_FLAGS_NOOPTWITHASM
"-W" CACHE STRING
"Flags used by the shared lib linker during NoOptWithASM builds." FORCE)
mark_as_advanced(
CMAKE_CXX_FLAGS_NOOPTWITHASM
CMAKE_C_FLAGS_NOOPTWITHASM
CMAKE_EXE_LINKER_FLAGS_NOOPTWITHASM
CMAKE_SHARED_LINKER_FLAGS_NOOPTWITHASM)
endif()
########################################################################
# For GCC and Clang, we can set a build type:
#
# -DCMAKE_BUILD_TYPE=O2WithASM
#
# This type uses level 2 optimization (-O2), outputs debug symbols
# (-g) and outputs all intermediary files the build system produces,
# including all assembly (.s) files. Look in the build directory for
# these files.
# NOTE: This is not defined on Windows systems.
########################################################################
if(NOT WIN32)
set(CMAKE_CXX_FLAGS_O2WITHASM "-Wall -save-temps -g -O2" CACHE STRING
"Flags used by the C++ compiler during O2WithASM builds." FORCE)
set(CMAKE_C_FLAGS_O2WITHASM "-Wall -save-temps -g -O2" CACHE STRING
"Flags used by the C compiler during O2WithASM builds." FORCE)
set(CMAKE_EXE_LINKER_FLAGS_O2WITHASM
"-W" CACHE STRING
"Flags used for linking binaries during O2WithASM builds." FORCE)
set(CMAKE_SHARED_LINKER_FLAGS_O2WITHASM
"-W" CACHE STRING
"Flags used by the shared lib linker during O2WithASM builds." FORCE)
mark_as_advanced(
CMAKE_CXX_FLAGS_O2WITHASM
CMAKE_C_FLAGS_O2WITHASM
CMAKE_EXE_LINKER_FLAGS_O2WITHASM
CMAKE_SHARED_LINKER_FLAGS_O2WITHASM)
endif()
########################################################################
# For GCC and Clang, we can set a build type:
#
# -DCMAKE_BUILD_TYPE=O3WithASM
#
# This type uses level 3 optimization (-O3), outputs debug symbols
# (-g) and outputs all intermediary files the build system produces,
# including all assembly (.s) files. Look in the build directory for
# these files.
# NOTE: This is not defined on Windows systems.
########################################################################
if(NOT WIN32)
set(CMAKE_CXX_FLAGS_O3WITHASM "-Wall -save-temps -g -O3" CACHE STRING
"Flags used by the C++ compiler during O3WithASM builds." FORCE)
set(CMAKE_C_FLAGS_O3WITHASM "-Wall -save-temps -g -O3" CACHE STRING
"Flags used by the C compiler during O3WithASM builds." FORCE)
set(CMAKE_EXE_LINKER_FLAGS_O3WITHASM
"-W" CACHE STRING
"Flags used for linking binaries during O3WithASM builds." FORCE)
set(CMAKE_SHARED_LINKER_FLAGS_O3WITHASM
"-W" CACHE STRING
"Flags used by the shared lib linker during O3WithASM builds." FORCE)
mark_as_advanced(
CMAKE_CXX_FLAGS_O3WITHASM
CMAKE_C_FLAGS_O3WITHASM
CMAKE_EXE_LINKER_FLAGS_O3WITHASM
CMAKE_SHARED_LINKER_FLAGS_O3WITHASM)
endif()
########################################################################
# For GCC and Clang, we can set a build type:
#
# -DCMAKE_BUILD_TYPE=ASAN
#
# This type creates an address sanitized build (-fsanitize=address)
# and defaults to the DebugParanoid linker flags.
# NOTE: This is not defined on Windows systems.
########################################################################
if(NOT WIN32)
set(CMAKE_CXX_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer" CACHE STRING
"Flags used by the C++ compiler during Address Sanitized builds." FORCE)
set(CMAKE_C_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer" CACHE STRING
"Flags used by the C compiler during Address Sanitized builds." FORCE)
set(CMAKE_EXE_LINKER_FLAGS_ASAN
"-W" CACHE STRING
"Flags used for linking binaries during Address Sanitized builds." FORCE)
set(CMAKE_SHARED_LINKER_FLAGS_ASAN
"-W" CACHE STRING
"Flags used by the shared lib linker during Address Sanitized builds." FORCE)
mark_as_advanced(
CMAKE_CXX_FLAGS_ASAN
CMAKE_C_FLAGS_ASAN
CMAKE_EXE_LINKER_FLAGS_ASAN
CMAKE_SHARED_LINKER_ASAN)
endif()

View File

@ -0,0 +1,191 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2024 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
if(NOT COMMAND feature_summary)
include(FeatureSummary)
endif()
if(NOT GNSSSDR_LIB_PATHS)
include(GnsssdrLibPaths)
endif()
################################################################################
# OpenSSL https://www.openssl.org/
################################################################################
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(OPENSSL_ROOT_DIR /usr/local/opt/openssl) # Trick for Homebrew
endif()
unset(OPENSSL_FOUND CACHE)
unset(GnuTLS_FOUND CACHE)
unset(GMP_FOUND CACHE)
if(NOT ENABLE_GNUTLS)
find_package(OpenSSL)
endif()
set_package_properties(OpenSSL
PROPERTIES
URL "https://www.openssl.org"
PURPOSE "Used for the OSNMA and SUPL protocol implementations."
TYPE REQUIRED
)
if(OPENSSL_FOUND)
set_package_properties(OpenSSL
PROPERTIES
DESCRIPTION "Cryptography and SSL/TLS Toolkit (found: v${OPENSSL_VERSION})"
)
else()
set_package_properties(OpenSSL
PROPERTIES
DESCRIPTION "OpenSSL has not been found, but GnuTLS with openssl compatibility can replace it"
)
################################################################################
# GnuTLS - https://www.gnutls.org/
################################################################################
find_package(GnuTLS)
set_package_properties(GnuTLS PROPERTIES
URL "https://www.gnutls.org/"
PURPOSE "Used for the OSNMA and SUPL protocol implementations."
TYPE REQUIRED
)
if(GnuTLS_FOUND AND GNUTLS_VERSION_STRING)
set_package_properties(GnuTLS PROPERTIES
DESCRIPTION "Transport Layer Security Library (found: v${GNUTLS_VERSION_STRING})"
)
else()
set_package_properties(GnuTLS PROPERTIES
DESCRIPTION "Transport Layer Security Library"
)
endif()
find_library(GNUTLS_OPENSSL_LIBRARY
NAMES gnutls-openssl libgnutls-openssl.so.27
PATHS ${GNSSSDR_LIB_PATHS}
)
find_path(GNUTLS_INCLUDE_DIR NAMES gnutls/gnutls.h
PATHS
/usr/include
/usr/local/include
/opt/local/include # default location in Macports
/opt/homebrew/opt/gnutls/include/
${GNUTLS_ROOT_DIR}/include/
)
if(NOT GNUTLS_OPENSSL_LIBRARY)
message(" The GnuTLS library with openssl compatibility enabled has not been found.")
message(" You can try to install the required libraries by typing:")
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|kFreeBSD|GNU")
if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
message(" sudo yum install openssl-devel")
else()
message(" sudo apt-get install libgnutls28-dev")
endif()
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
message(" 'sudo port install openssl3', if you are using Macports, or")
message(" 'brew install openssl', if you are using Homebrew.")
endif()
message(FATAL_ERROR "OpenSSL or the GnuTLS libraries with openssl compatibility are required to build gnss-sdr")
endif()
# Test GnuTLS capabilities
file(READ "${GNUTLS_INCLUDE_DIR}/gnutls/gnutls.h" gnutls_gnutls_file_contents)
if("${gnutls_gnutls_file_contents}" MATCHES "GNUTLS_SIGN_ECDSA_SHA256")
set(GNUTLS_SIGN_ECDSA_SHA256 TRUE)
endif()
if("${gnutls_gnutls_file_contents}" MATCHES "GNUTLS_SIGN_ECDSA_SHA512")
set(GNUTLS_SIGN_ECDSA_SHA512 TRUE)
endif()
if("${gnutls_gnutls_file_contents}" MATCHES "GNUTLS_DIG_SHA3_256")
set(GNUTLS_DIG_SHA3_256 TRUE)
endif()
if("${gnutls_gnutls_file_contents}" MATCHES "#define GNUTLS_VERSION_MAJOR 2")
set(GNUTLS_HMAC_INIT_WITH_DIGEST TRUE)
endif()
if("${gnutls_gnutls_file_contents}" MATCHES "GNUTLS_MAC_AES_CMAC_128")
set(GNUTLS_MAC_AES_CMAC_128 TRUE)
endif()
file(READ "${GNUTLS_INCLUDE_DIR}/gnutls/abstract.h" gnutls_abstract_file_contents)
if("${gnutls_abstract_file_contents}" MATCHES "gnutls_pubkey_export2")
set(GNUTLS_PUBKEY_EXPORT2 TRUE)
endif()
find_package(GMP)
set_package_properties(GMP PROPERTIES
PURPOSE "Required to decompress cryptographic keys."
TYPE REQUIRED
)
if(NOT GMP_FOUND)
message(FATAL_ERROR "GMP is required by gnss-sdr if linking against GnuTLS")
endif()
endif()
################################################################################
function(link_to_crypto_dependencies target)
if(OPENSSL_FOUND)
if(TARGET OpenSSL::SSL)
target_link_libraries(${target}
PUBLIC
OpenSSL::SSL
)
if(TARGET OpenSSL::Crypto)
target_link_libraries(${target}
PUBLIC
OpenSSL::Crypto
)
endif()
else()
target_link_libraries(${target}
PUBLIC
${OPENSSL_LIBRARIES}
"${OPENSSL_CRYPTO_LIBRARIES}"
)
target_include_directories(${target}
PUBLIC
${OPENSSL_INCLUDE_DIR}
)
endif()
if(OPENSSL_VERSION)
if(OPENSSL_VERSION VERSION_GREATER "3.0.0")
target_compile_definitions(${target} PUBLIC -DUSE_OPENSSL_3=1)
else()
if(NOT OPENSSL_VERSION VERSION_LESS "1.1.1")
target_compile_definitions(${target} PUBLIC -DUSE_OPENSSL_111=1)
endif()
endif()
endif()
else() # GnuTLS
target_link_libraries(${target}
PUBLIC
${GNUTLS_LIBRARIES}
${GNUTLS_OPENSSL_LIBRARY}
PRIVATE
Gmp::gmp
)
target_include_directories(${target}
PUBLIC
${GNUTLS_INCLUDE_DIR}
)
target_compile_definitions(${target} PUBLIC -DUSE_GNUTLS_FALLBACK=1)
if(GNUTLS_SIGN_ECDSA_SHA256)
target_compile_definitions(${target} PRIVATE -DHAVE_GNUTLS_SIGN_ECDSA_SHA256=1)
endif()
if(GNUTLS_SIGN_ECDSA_SHA512)
target_compile_definitions(${target} PRIVATE -DHAVE_GNUTLS_SIGN_ECDSA_SHA512=1)
endif()
if(GNUTLS_DIG_SHA3_256)
target_compile_definitions(${target} PRIVATE -DHAVE_GNUTLS_DIG_SHA3_256=1)
endif()
if(GNUTLS_PUBKEY_EXPORT2)
target_compile_definitions(${target} PRIVATE -DHAVE_GNUTLS_PUBKEY_EXPORT2=1)
endif()
if(GNUTLS_HMAC_INIT_WITH_DIGEST)
target_compile_definitions(${target} PRIVATE -DHAVE_GNUTLS_HMAC_INIT_WITH_DIGEST=1)
endif()
if(GNUTLS_MAC_AES_CMAC_128)
target_compile_definitions(${target} PRIVATE -DHAVE_GNUTLS_MAC_AES_CMAC_128=1)
endif()
endif()
endfunction()

View File

@ -0,0 +1,43 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2024 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
if(GNSSSDR_LIB_PATHS)
return()
endif()
set(GNSSSDR_LIB_PATHS
/usr/lib
/usr/lib/aarch64-linux-gnu
/usr/lib/alpha-linux-gnu
/usr/lib/arm-linux-gnueabi
/usr/lib/arm-linux-gnueabihf
/usr/lib/hppa-linux-gnu
/usr/lib/hppa-linux-gnu
/usr/lib/i386-gnu
/usr/lib/i386-kfreebsd-gnu
/usr/lib/i386-linux-gnu
/usr/lib/loongarch64-linux-gnu
/usr/lib/m68k-linux-gnu
/usr/lib/mips-linux-gnu
/usr/lib/mips64el-linux-gnuabi64
/usr/lib/mipsel-linux-gnu
/usr/lib/powerpc-linux-gnu
/usr/lib/powerpc-linux-gnuspe
/usr/lib/powerpc64-linux-gnu
/usr/lib/powerpc64le-linux-gnu
/usr/lib/riscv64-linux-gnu
/usr/lib/s390x-linux-gnu
/usr/lib/sh4-linux-gnu
/usr/lib/sparc64-linux-gnu
/usr/lib/x86_64-kfreebsd-gnu
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnux32
/usr/lib64
/usr/local/lib
/usr/local/lib/i386
/usr/local/lib64
/opt/local/lib
)

View File

@ -0,0 +1,196 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
########################################################################
# Check for the existence of a python module:
# - desc a string description of the check
# - mod the name of the module to import
# - cmd an additional command to run
# - have the result variable to set
########################################################################
macro(GNSSSDR_PYTHON_CHECK_MODULE desc mod cmd have)
message(STATUS "Python checking for ${desc}")
execute_process(
COMMAND ${PYTHON_EXECUTABLE} -c "
#########################################
try: import ${mod}
except:
try: ${mod}
except: exit(-1)
try: assert ${cmd}
except: exit(-1)
#########################################"
OUTPUT_QUIET ERROR_QUIET
RESULT_VARIABLE ${have}
)
if(${have} EQUAL 0)
message(STATUS "Python checking for ${desc} - found")
set(${have} TRUE)
else()
message(STATUS "Python checking for ${desc} - not found")
set(${have} FALSE)
endif()
endmacro()
########################################################################
# Setup the python interpreter:
# This allows the user to specify a specific interpreter,
# or finds the interpreter via the built-in cmake module.
########################################################################
if(CMAKE_VERSION VERSION_LESS 3.12 OR CMAKE_CROSSCOMPILING)
if(PYTHON_EXECUTABLE)
message(STATUS "User set python executable ${PYTHON_EXECUTABLE}")
string(FIND "${PYTHON_EXECUTABLE}" "python3" IS_PYTHON3)
if(IS_PYTHON3 EQUAL -1)
if(CMAKE_VERSION VERSION_LESS "3.24")
find_package(PythonInterp ${GNSSSDR_PYTHON_MIN_VERSION} REQUIRED)
else()
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
find_package(Python2 COMPONENTS Interpreter)
set(PYTHONINTERP_FOUND Python2_Interpreter_FOUND)
set(PYTHON_VERSION_MAJOR "${Python2_VERSION_MAJOR}")
set(PYTHON_VERSION_STRING "${Python2_VERSION_MAJOR}.${Python2_VERSION_MINOR}")
endif()
else()
if(CMAKE_VERSION VERSION_LESS "3.24")
find_package(PythonInterp ${GNSSSDR_PYTHON3_MIN_VERSION} REQUIRED)
else()
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
find_package(Python3 COMPONENTS Interpreter)
set(PYTHONINTERP_FOUND Python3_Interpreter_FOUND)
set(PYTHON_VERSION_MAJOR "${Python3_VERSION_MAJOR}")
set(PYTHON_VERSION_STRING "${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}")
endif()
endif()
gnsssdr_python_check_module("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
gnsssdr_python_check_module("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
if(IS_PYTHON3 EQUAL -1)
gnsssdr_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
endif()
else()
message(STATUS "PYTHON_EXECUTABLE not set - trying by default python3")
if(CMAKE_VERSION VERSION_LESS "3.24")
set(Python_ADDITIONAL_VERSIONS 3.4 3.5 3.6 3.7 3.8 3.9 3.10 3.11)
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION})
else()
find_package(Python COMPONENTS Interpreter)
set(PYTHONINTERP_FOUND Python_Interpreter_FOUND)
set(PYTHON_EXECUTABLE "${Python_EXECUTABLE}")
set(PYTHON_VERSION_MAJOR "${Python_VERSION_MAJOR}")
set(PYTHON_VERSION_STRING "${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}")
endif()
if(NOT PYTHONINTERP_FOUND)
message(STATUS "python3 not found - trying with python2.7")
if(CMAKE_VERSION VERSION_LESS "3.24")
set(Python_ADDITIONAL_VERSIONS 3.4 3.5 3.6 3.7 3.8 3.9 3.10 3.11)
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION})
else()
find_package(Python2 COMPONENTS Interpreter)
set(PYTHONINTERP_FOUND Python2_Interpreter_FOUND)
set(PYTHON_EXECUTABLE "${Python2_EXECUTABLE}")
set(PYTHON_VERSION_MAJOR "${Python2_VERSION_MAJOR}")
set(PYTHON_VERSION_STRING "${Python2_VERSION_MAJOR}.${Python2_VERSION_MINOR}")
endif()
endif()
gnsssdr_python_check_module("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
gnsssdr_python_check_module("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
if(PYTHON_VERSION_STRING VERSION_LESS "3.0")
gnsssdr_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
endif()
endif()
else()
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(_previous ${CMAKE_FIND_FRAMEWORK})
set(CMAKE_FIND_FRAMEWORK LAST)
endif()
if(PYTHON_EXECUTABLE)
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
endif()
find_package(Python3 COMPONENTS Interpreter)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CMAKE_FIND_FRAMEWORK ${_previous})
endif()
if(Python3_FOUND)
set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
set(PYTHON_VERSION_MAJOR "${Python3_VERSION_MAJOR}")
set(PYTHON_VERSION_STRING "${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}")
gnsssdr_python_check_module("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
gnsssdr_python_check_module("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
endif()
if(NOT Python3_FOUND OR NOT MAKO_FOUND)
find_package(Python2 COMPONENTS Interpreter)
if(Python2_FOUND)
set(PYTHON_EXECUTABLE ${Python2_EXECUTABLE})
set(PYTHON_VERSION_MAJOR ${Python2_VERSION_MAJOR})
set(PYTHON_VERSION_STRING "${Python2_VERSION_MAJOR}.${Python2_VERSION_MINOR}")
gnsssdr_python_check_module("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
gnsssdr_python_check_module("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
gnsssdr_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
endif()
if(NOT MAKO_FOUND OR NOT SIX_FOUND)
unset(PYTHON_EXECUTABLE)
if(CMAKE_VERSION VERSION_LESS "3.24")
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION})
else()
find_package(Python COMPONENTS Interpreter)
set(PYTHONINTERP_FOUND Python_Interpreter_FOUND)
set(PYTHON_EXECUTABLE "${Python_EXECUTABLE}")
set(PYTHON_VERSION_STRING "${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}")
set(PYTHON_VERSION_MAJOR "${Python_VERSION_MAJOR}")
endif()
gnsssdr_python_check_module("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
gnsssdr_python_check_module("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
if(NOT MAKO_FOUND)
unset(PYTHON_EXECUTABLE)
unset(PYTHON_VERSION_STRING)
unset(PYTHON_VERSION_MAJOR)
find_program(PYTHON_EXECUTABLE NAMES python3 python)
if(PYTHON_EXECUTABLE)
set(PYTHONINTERP_FOUND TRUE)
execute_process(COMMAND ${PYTHON_EXECUTABLE} --version OUTPUT_VARIABLE PYTHON_VERSION_STRING_AUX)
string(FIND "${PYTHON_VERSION_STRING_AUX}" " " blank_char_index)
if(blank_char_index GREATER -1)
math(EXPR start_index "${blank_char_index} + 1")
string(SUBSTRING "${PYTHON_VERSION_STRING_AUX}" ${start_index} -1 PYTHON_VERSION_STRING)
string(STRIP ${PYTHON_VERSION_STRING} PYTHON_VERSION_STRING)
string(SUBSTRING "${PYTHON_VERSION_STRING_AUX}" ${start_index} 1 PYTHON_VERSION_MAJOR)
message(STATUS "Found Python: ${PYTHON_EXECUTABLE} (found version: ${PYTHON_VERSION_STRING})")
else()
string(FIND ${PYTHON_EXECUTABLE} "python3" is_python3)
if(is_python3 GREATER -1)
set(PYTHON_VERSION_MAJOR "3")
set(PYTHON_VERSION_STRING "3.10") # ?
else()
set(PYTHON_VERSION_MAJOR "2")
set(PYTHON_VERSION_STRING "2.7")
endif()
endif()
endif()
gnsssdr_python_check_module("mako >= 0.4.2" mako "mako.__version__ >= '0.4.2'" MAKO_FOUND)
endif()
if(MAKO_FOUND AND PYTHON_VERSION_STRING VERSION_LESS "3.0")
gnsssdr_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
endif()
endif()
endif()
endif()
if("${PYTHON_VERSION_MAJOR}" VERSION_EQUAL 3)
set(PYTHON3 TRUE)
endif()
if(CMAKE_CROSSCOMPILING)
set(QA_PYTHON_EXECUTABLE "/usr/bin/python")
else()
set(QA_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE})
endif()
# make the path to the executable appear in the cmake gui
set(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "python interpreter")
set(QA_PYTHON_EXECUTABLE ${QA_PYTHON_EXECUTABLE} CACHE FILEPATH "python interpreter for QA tests")

View File

@ -1,83 +0,0 @@
##############################################################################
# check if the compiler defines the architecture as ARM and set the
# version, if found.
#
# - Anthony Arnold
##############################################################################
if (__TEST_FOR_ARM_INCLUDED)
return ()
endif()
set(__TEST_FOR_ARM_INCLUDED TRUE)
# Function checks if the input string defines ARM version and sets the
# output variable if found.
function(check_arm_version ppdef input_string version output_var)
string(REGEX MATCH "${ppdef}" _VERSION_MATCH "${input_string}")
if (NOT _VERSION_MATCH STREQUAL "")
set(${output_var} "${version}" PARENT_SCOPE)
endif(NOT _VERSION_MATCH STREQUAL "")
endfunction()
message(STATUS "Checking for ARM")
set (IS_ARM NO)
set (ARM_VERSION "")
if (CMAKE_COMPILER_IS_GNUCXX)
execute_process(COMMAND echo "int main(){}"
COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} -dM -E -
OUTPUT_VARIABLE TEST_FOR_ARM_RESULTS)
string(REGEX MATCH "__arm" ARM_FOUND "${TEST_FOR_ARM_RESULTS}")
if (NOT ARM_FOUND STREQUAL "")
set(IS_ARM YES)
message(STATUS "ARM system detected")
# detect the version
check_arm_version("__ARM_ARCH_2__" ${TEST_FOR_ARM_RESULTS} "armv2" ARM_VERSION)
check_arm_version("__ARM_ARCH_2A__" ${TEST_FOR_ARM_RESULTS} "armv2a" ARM_VERSION)
check_arm_version("__ARM_ARCH_3__" ${TEST_FOR_ARM_RESULTS} "armv3" ARM_VERSION)
check_arm_version("__ARM_ARCH_3M__" ${TEST_FOR_ARM_RESULTS} "armv3m" ARM_VERSION)
check_arm_version("__ARM_ARCH_4__" ${TEST_FOR_ARM_RESULTS} "armv4" ARM_VERSION)
check_arm_version("__ARM_ARCH_4T__" ${TEST_FOR_ARM_RESULTS} "armv4t" ARM_VERSION)
check_arm_version("__ARM_ARCH_5__" ${TEST_FOR_ARM_RESULTS} "armv5" ARM_VERSION)
check_arm_version("__ARM_ARCH_5T__" ${TEST_FOR_ARM_RESULTS} "armv5t" ARM_VERSION)
check_arm_version("__ARM_ARCH_5E__" ${TEST_FOR_ARM_RESULTS} "armv5e" ARM_VERSION)
check_arm_version("__ARM_ARCH_5TE__" ${TEST_FOR_ARM_RESULTS} "armv5te" ARM_VERSION)
check_arm_version("__ARM_ARCH_6__" ${TEST_FOR_ARM_RESULTS} "armv6" ARM_VERSION)
check_arm_version("__ARM_ARCH_6J__" ${TEST_FOR_ARM_RESULTS} "armv6j" ARM_VERSION)
check_arm_version("__ARM_ARCH_6K__" ${TEST_FOR_ARM_RESULTS} "armv6k" ARM_VERSION)
check_arm_version("__ARM_ARCH_6T2__" ${TEST_FOR_ARM_RESULTS} "armv6t2" ARM_VERSION)
check_arm_version("__ARM_ARCH_6Z__" ${TEST_FOR_ARM_RESULTS} "armv6z" ARM_VERSION)
check_arm_version("__ARM_ARCH_6ZK__" ${TEST_FOR_ARM_RESULTS} "armv6zk" ARM_VERSION)
check_arm_version("__ARM_ARCH_6M__" ${TEST_FOR_ARM_RESULTS} "armv6-m" ARM_VERSION)
check_arm_version("__ARM_ARCH_7__" ${TEST_FOR_ARM_RESULTS} "armv7" ARM_VERSION)
check_arm_version("__ARM_ARCH_7A__" ${TEST_FOR_ARM_RESULTS} "armv7-a" ARM_VERSION)
check_arm_version("__ARM_ARCH_7M__" ${TEST_FOR_ARM_RESULTS} "armv7-m" ARM_VERSION)
check_arm_version("__ARM_ARCH_7R__" ${TEST_FOR_ARM_RESULTS} "armv7-r" ARM_VERSION)
check_arm_version("__ARM_ARCH_7EM_" ${TEST_FOR_ARM_RESULTS} "armv7e-m" ARM_VERSION)
check_arm_version("__ARM_ARCH_7VE__" ${TEST_FOR_ARM_RESULTS} "armv7ve" ARM_VERSION)
check_arm_version("__ARM_ARCH_8A__" ${TEST_FOR_ARM_RESULTS} "armv8-a" ARM_VERSION)
# anything else just define as arm
if (ARM_VERSION STREQUAL "")
message(STATUS "Couldn't detect ARM version. Setting to 'arm'")
set(ARM_VERSION "arm")
else (ARM_VERSION STREQUAL "")
message(STATUS "ARM version ${ARM_VERSION} detected")
endif (ARM_VERSION STREQUAL "")
else (NOT ARM_FOUND STREQUAL "")
message(STATUS "System is not ARM")
endif(NOT ARM_FOUND STREQUAL "")
else (CMAKE_COMPILE_IS_GNUCXX)
# TODO: Other compilers
message(STATUS "Not detecting ARM on non-GNUCXX compiler. Defaulting to false")
message(STATUS "If you are compiling for ARM, set IS_ARM=ON manually")
endif(CMAKE_COMPILER_IS_GNUCXX)
set(IS_ARM ${IS_ARM} CACHE BOOL "Compiling for ARM")
set(ARM_VERSION ${ARM_VERSION} CACHE STRING "ARM version")

View File

@ -1,38 +0,0 @@
###############################################################################
# Test for availability of SSE
#
# - Anthony Arnold
###############################################################################
function (test_for_sse h_file result_var name)
if (NOT DEFINED ${result_var})
execute_process(COMMAND echo "#include <${h_file}>"
COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} -c -x c++ -
RESULT_VARIABLE COMPILE_RESULT
OUTPUT_QUIET ERROR_QUIET)
set(detected 0)
if (COMPILE_RESULT EQUAL 0)
message(STATUS "Detected ${name}")
set(detected 1)
endif(COMPILE_RESULT EQUAL 0)
set(${result_var} ${detected} CACHE INTERNAL "${name} Available")
endif (NOT DEFINED ${result_var})
endfunction(test_for_sse)
message(STATUS "Testing for SIMD extensions")
enable_language(C)
test_for_sse("ammintrin.h" SSE4A_AVAILABLE "SSE4A")
test_for_sse("nmmintrin.h" SSE4_2_AVAILABLE "SSE4.2")
test_for_sse("smmintrin.h" SSE4_1_AVAILABLE "SSE4.1")
test_for_sse("tmmintrin.h" SSSE3_AVAILABLE "SSSE3")
test_for_sse("pmmintrin.h" SSE3_AVAILABLE "SSE3")
test_for_sse("emmintrin.h" SSE2_AVAILABLE "SSE2")
test_for_sse("xmmintrin.h" SSE_AVAILABLE "SSE1")
test_for_sse("mmintrin.h" MMX_AVAILABLE "MMX")
test_for_sse("wmmintrin.h" AES_AVAILABLE "AES")
test_for_sse("immintrin.h" AVX_AVAILABLE "AVX")
file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/-.o")

View File

@ -0,0 +1,23 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2024 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
if(DEFINED __INCLUDED_XCODE_REMOVE_WARNING_DUPLICATES_CMAKE)
return()
endif()
set(__INCLUDED_XCODE_REMOVE_WARNING_DUPLICATES_CMAKE TRUE)
function(xcode_remove_warning_duplicates target)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "15.0.0")
# A bug in Xcode 15 adds duplicate flags to the linker. In addition, the
# `-warn_duplicate_libraries` is now enabled by default which may result
# in several 'duplicate libraries warning'.
# - https://gitlab.kitware.com/cmake/cmake/-/issues/25297 and
# - https://indiestack.com/2023/10/xcode-15-duplicate-library-linker-warnings/
target_link_options(${target} PUBLIC "LINKER:-no_warn_duplicate_libraries")
endif()
endif()
endfunction()

View File

@ -1,10 +0,0 @@
#!/bin/sh
set -e
mkdir fix_up_deb
dpkg-deb -x @CPACK_PACKAGE_FILE_NAME@.deb fix_up_deb_permissions
dpkg-deb --control @CPACK_PACKAGE_FILE_NAME@.deb fix_up_deb_permissions/DEBIAN
rm @CPACK_PACKAGE_FILE_NAME@.deb
chmod 0644 fix_up_deb_permissions/DEBIAN/md5sums
find -type d -print0 |xargs -0 chmod 755
fakeroot dpkg -b fix_up_deb_permissions @CPACK_PACKAGE_FILE_NAME@.deb
rm -rf fix_up_deb_permissions

View File

@ -1,4 +0,0 @@
#!/bin/sh
set -e
chmod +x @CMAKE_INSTALL_PREFIX@/bin/@PROJECT_NAME@
chmod +x @CMAKE_INSTALL_PREFIX@/bin/volk_gnsssdr_profile

View File

@ -1,14 +0,0 @@
#!/bin/sh
set -e
if test -e @CMAKE_INSTALL_PREFIX@/@PROJECT_NAME@ ; then
rm @CMAKE_INSTALL_PREFIX@/bin/@PROJECT_NAME@
rm @CMAKE_INSTALL_PREFIX@/bin/volk_gnsssdr_profile
fi
if test -e @CMAKE_INSTALL_PREFIX@/share/@PROJECT_NAME@ ; then
rm -rf @CMAKE_INSTALL_PREFIX@/share/@PROJECT_NAME@
fi
if test -e @CMAKE_INSTALL_PREFIX@/share/man/man1/@PROJECT_NAME@.1.gz ; then
rm @CMAKE_INSTALL_PREFIX@/share/man/man1/@PROJECT_NAME@.1.gz
rm @CMAKE_INSTALL_PREFIX@/share/man/man1/volk_gnsssdr_profile.1.gz
fi

View File

@ -0,0 +1,39 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR aarch64)
if(MINGW OR CYGWIN OR WIN32)
set(UTIL_SEARCH_CMD where)
elseif(UNIX OR APPLE)
set(UTIL_SEARCH_CMD which)
endif()
set(TOOLCHAIN_PREFIX aarch64-linux-gnu-)
execute_process(
COMMAND ${UTIL_SEARCH_CMD} ${TOOLCHAIN_PREFIX}gcc
OUTPUT_VARIABLE BINUTILS_PATH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
get_filename_component(ARM_TOOLCHAIN_DIR ${BINUTILS_PATH} DIRECTORY)
# The following is not needed on debian
# Without that flag CMake is not able to pass test compilation check
#set(CMAKE_EXE_LINKER_FLAGS_INIT "--specs=nosys.specs")
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}gcc)
set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER})
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}g++)
set(CMAKE_OBJCOPY ${ARM_TOOLCHAIN_DIR}/${TOOLCHAIN_PREFIX}objcopy CACHE INTERNAL "objcopy tool")
set(CMAKE_SIZE_UTIL ${ARM_TOOLCHAIN_DIR}/${TOOLCHAIN_PREFIX}size CACHE INTERNAL "size tool")
set(CMAKE_FIND_ROOT_PATH ${BINUTILS_PATH})
set(CMAKE_CROSSCOMPILING_EMULATOR "qemu-aarch64 -L /usr/aarch64-linux-gnu/")

View File

@ -0,0 +1,42 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)
if(MINGW OR CYGWIN OR WIN32)
set(UTIL_SEARCH_CMD where)
elseif(UNIX OR APPLE)
set(UTIL_SEARCH_CMD which)
endif()
set(TOOLCHAIN_PREFIX arm-linux-gnueabihf-)
execute_process(
COMMAND ${UTIL_SEARCH_CMD} ${TOOLCHAIN_PREFIX}gcc
OUTPUT_VARIABLE BINUTILS_PATH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
get_filename_component(ARM_TOOLCHAIN_DIR ${BINUTILS_PATH} DIRECTORY)
# The following is not needed on debian
# Without that flag CMake is not able to pass test compilation check
#set(CMAKE_EXE_LINKER_FLAGS_INIT "--specs=nosys.specs")
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}gcc)
set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER})
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}g++)
## the following is needed for CheckCSourceCompiles used in lib/CMakeLists.txt
set(CMAKE_C_FLAGS "-mfpu=neon" CACHE STRING "" FORCE)
set(CMAKE_ASM_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "" FORCE)
set(CMAKE_OBJCOPY ${ARM_TOOLCHAIN_DIR}/${TOOLCHAIN_PREFIX}objcopy CACHE INTERNAL "objcopy tool")
set(CMAKE_SIZE_UTIL ${ARM_TOOLCHAIN_DIR}/${TOOLCHAIN_PREFIX}size CACHE INTERNAL "size tool")
set(CMAKE_FIND_ROOT_PATH ${BINUTILS_PATH})
set(CMAKE_CROSSCOMPILING_EMULATOR "qemu-arm -L /usr/arm-linux-gnueabihf/")

View File

@ -0,0 +1,15 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
########################################################################
# Toolchain file for building native on a ARM Cortex A8 w/ NEON
# Usage: cmake -DCMAKE_TOOLCHAIN_FILE=<this file> <source directory>
########################################################################
set(CMAKE_CXX_COMPILER g++)
set(CMAKE_C_COMPILER gcc)
set(CMAKE_CXX_FLAGS "-march=armv7-a -mtune=cortex-a15 -mfpu=neon -mfloat-abi=hard" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE) # same flags for C sources
set(CMAKE_ASM_FLAGS "${CMAKE_CXX_FLAGS} -g" CACHE STRING "" FORCE) # same flags for asm sources

View File

@ -0,0 +1,15 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
########################################################################
# Toolchain file for building native on a ARM Cortex A53 w/ NEON
# Usage: cmake -DCMAKE_TOOLCHAIN_FILE=<this file> <source directory>
########################################################################
set(CMAKE_CXX_COMPILER g++)
set(CMAKE_C_COMPILER gcc)
set(CMAKE_CXX_FLAGS "-march=armv8-a -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE) # same flags for C sources
set(CMAKE_ASM_FLAGS "${CMAKE_CXX_FLAGS} -mthumb -g" CACHE STRING "" FORCE) # same flags for asm sources

View File

@ -0,0 +1,15 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
########################################################################
# Toolchain file for building native on a ARM Cortex A72 w/ NEON
# Usage: cmake -DCMAKE_TOOLCHAIN_FILE=<this file> <source directory>
########################################################################
set(CMAKE_CXX_COMPILER g++)
set(CMAKE_C_COMPILER gcc)
set(CMAKE_CXX_FLAGS "-march=armv8-a -mtune=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE) # same flags for C sources
set(CMAKE_ASM_FLAGS "${CMAKE_CXX_FLAGS} -mthumb -g" CACHE STRING "" FORCE) # same flags for asm sources

View File

@ -0,0 +1,15 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
########################################################################
# Toolchain file for building native on a ARM Cortex A8 w/ NEON
# Usage: cmake -DCMAKE_TOOLCHAIN_FILE=<this file> <source directory>
########################################################################
set(CMAKE_CXX_COMPILER g++)
set(CMAKE_C_COMPILER gcc)
set(CMAKE_CXX_FLAGS "-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE) # same flags for C sources
set(CMAKE_ASM_FLAGS "${CMAKE_CXX_FLAGS} -g" CACHE STRING "" FORCE) # same flags for asm sources

View File

@ -0,0 +1,15 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
########################################################################
# Toolchain file for building native on a ARM Cortex A8 w/ NEON
# Usage: cmake -DCMAKE_TOOLCHAIN_FILE=<this file> <source directory>
########################################################################
set(CMAKE_CXX_COMPILER g++)
set(CMAKE_C_COMPILER gcc)
set(CMAKE_CXX_FLAGS "-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE) # same flags for C sources
set(CMAKE_ASM_FLAGS "${CMAKE_CXX_FLAGS} -g" CACHE STRING "" FORCE) # same flags for asm sources

View File

@ -0,0 +1,15 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
########################################################################
# Toolchain file for building native on a ARM Cortex A8 w/ NEON
# Usage: cmake -DCMAKE_TOOLCHAIN_FILE=<this file> <source directory>
########################################################################
set(CMAKE_CXX_COMPILER g++)
set(CMAKE_C_COMPILER gcc)
set(CMAKE_CXX_FLAGS "-march=armv7-a -mtune=cortex-a9 -mfpu=neon -mfloat-abi=hard" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE) # same flags for C sources
set(CMAKE_ASM_FLAGS "${CMAKE_CXX_FLAGS} -g" CACHE STRING "" FORCE) # same flags for asm sources

View File

@ -0,0 +1,26 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
##########################################################
# Toolchain file for Open Embedded
##########################################################
set(CMAKE_SYSTEM_NAME Linux)
string(REGEX MATCH "sysroots/([a-zA-Z0-9]+)" CMAKE_SYSTEM_PROCESSOR $ENV{SDKTARGETSYSROOT})
string(REGEX REPLACE "sysroots/" "" CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR})
set(CMAKE_CXX_FLAGS $ENV{CXXFLAGS} CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS $ENV{CFLAGS} CACHE STRING "" FORCE) # same flags for C sources
set(CMAKE_LDFLAGS_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE) # same flags for C sources
set(CMAKE_LIBRARY_PATH $ENV{OECORE_TARGET_SYSROOT}/usr/lib)
set(CMAKE_FIND_ROOT_PATH $ENV{OECORE_TARGET_SYSROOT} $ENV{OECORE_NATIVE_SYSROOT})
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(ORC_INCLUDE_DIRS $ENV{OECORE_TARGET_SYSROOT}/usr/include/orc-0.4)
set(ORC_LIBRARY_DIRS $ENV{OECORE_TARGET_SYSROOT}/usr/lib)

View File

@ -0,0 +1,15 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
########################################################################
# Toolchain file for building native on a ARM Cortex A72 w/ NEON
# Usage: cmake -DCMAKE_TOOLCHAIN_FILE=<this file> <source directory>
########################################################################
set(CMAKE_CXX_COMPILER g++)
set(CMAKE_C_COMPILER gcc)
set(CMAKE_CXX_FLAGS "-march=armv8-a -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE) # same flags for C sources
set(CMAKE_ASM_FLAGS "${CMAKE_CXX_FLAGS} -mthumb -g" CACHE STRING "" FORCE) # same flags for asm sources

View File

@ -0,0 +1,15 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
########################################################################
# Toolchain file for building native on a ARM Cortex A72 w/ NEON
# Usage: cmake -DCMAKE_TOOLCHAIN_FILE=<this file> <source directory>
########################################################################
set(CMAKE_CXX_COMPILER g++)
set(CMAKE_C_COMPILER gcc)
set(CMAKE_CXX_FLAGS "-march=armv8-a -mtune=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE) # same flags for C sources
set(CMAKE_ASM_FLAGS "${CMAKE_CXX_FLAGS} -mthumb -g" CACHE STRING "" FORCE) # same flags for asm sources

View File

@ -0,0 +1,36 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
##########################################################
# Toolchain file for Zynq-7000 devices
##########################################################
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_SYSROOT /home/carlesfernandez/binary) ### POINT THIS TO YOUR ROOTFS
set(CMAKE_C_COMPILER /usr/bin/arm-linux-gnueabihf-gcc)
set(CMAKE_CXX_COMPILER /usr/bin/arm-linux-gnueabihf-g++)
set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(ZYNQ_FLAGS
"-march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a7"
)
set(CMAKE_ASM_FLAGS ${ZYNQ_FLAGS} CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS ${ZYNQ_FLAGS} CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS ${ZYNQ_FLAGS} CACHE STRING "" FORCE)
set(CMAKE_LIBRARY_PATH
${CMAKE_SYSROOT}/usr/lib
${CMAKE_SYSROOT}/usr/lib/arm-linux-gnueabihf
)
set(CMAKE_INSTALL_PREFIX ${CMAKE_SYSROOT}/usr CACHE STRING "" FORCE)

View File

@ -1,21 +1,35 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR.
#
# SPDX-FileCopyrightText: 2011-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
endif()
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
string(REGEX REPLACE "\n" ";" files "${files}")
foreach(file ${files})
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
exec_program(
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
OUTPUT_VARIABLE rm_out
RETURN_VALUE rm_retval
)
if(NOT "${rm_retval}" STREQUAL 0)
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
endif(NOT "${rm_retval}" STREQUAL 0)
else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
endforeach(file)
message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
if(CMAKE_VERSION VERSION_LESS 3.17)
execute_process(
COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}"
OUTPUT_VARIABLE rm_out
RESULT_VARIABLE rm_retval
)
else()
execute_process(
COMMAND @CMAKE_COMMAND@ -E rm "$ENV{DESTDIR}${file}"
OUTPUT_VARIABLE rm_out
RESULT_VARIABLE rm_retval
)
endif()
if(NOT "${rm_retval}" STREQUAL 0)
message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
endif()
else()
message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
endif()
endforeach()

View File

@ -0,0 +1,127 @@
; This is a GNSS-SDR configuration file
; The configuration API is described at https://gnss-sdr.org/docs/sp-blocks/
; SPDX-License-Identifier: GPL-3.0-or-later
; SPDX-FileCopyrightText: (C) 2010-2020 (see AUTHORS file for a list of contributors)
; You can define your own receiver and invoke it by doing
; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf
;
[GNSS-SDR]
;######### GLOBAL OPTIONS ##################
;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second].
GNSS-SDR.internal_fs_sps=25000000
;######### CONTROL_THREAD CONFIG ############
ControlThread.wait_for_flowgraph=false
;######### SIGNAL_SOURCE CONFIG ############
SignalSource.implementation=File_Signal_Source
SignalSource.filename=/archive/BDS3_datasets/BdsB1IStr01.dat
SignalSource.item_type=byte
SignalSource.sampling_frequency=25000000
SignalSource.samples=0
SignalSource.repeat=false
SignalSource.dump=false
SignalSource.enable_throttle_control=false
;######### SIGNAL_CONDITIONER CONFIG ############
SignalConditioner.implementation=Signal_Conditioner
DataTypeAdapter.implementation=Byte_To_Short
InputFilter.implementation=Freq_Xlating_Fir_Filter
InputFilter.input_item_type=short
InputFilter.output_item_type=gr_complex
InputFilter.taps_item_type=float
InputFilter.number_of_taps=5
InputFilter.number_of_bands=2
InputFilter.band1_begin=0.0
InputFilter.band1_end=0.70
InputFilter.band2_begin=0.80
InputFilter.band2_end=1.0
InputFilter.ampl1_begin=1.0
InputFilter.ampl1_end=1.0
InputFilter.ampl2_begin=0.0
InputFilter.ampl2_end=0.0
InputFilter.band1_error=1.0
InputFilter.band2_error=1.0
InputFilter.filter_type=bandpass
InputFilter.grid_density=16
InputFilter.sampling_frequency=25000000
InputFilter.IF=6250000
InputFilter.dump = false
InputFilter.dump_filename=/home/dmiralles/Documents/gnss-sdr/tests/signal_samples/BdsB1IStr01_fs25e6_if0_4ms.dat
Resampler.implementation=Pass_Through
Resampler.sample_freq_in=25000000
Resampler.sample_freq_out=25000000
Resampler.item_type=gr_complex
;######### CHANNELS GLOBAL CONFIG ############
Channels_B1.count=10
Channels.in_acquisition=1
Channel.signal=B1
Channel0.satellite = 6;
Channel1.satellite = 8;
Channel2.satellite = 9;
Channel3.satellite = 13;
Channel4.satellite = 17;
Channel5.satellite = 1;
Channel6.satellite = 2;
Channel7.satellite = 3;
Channel8.satellite = 4;
Channel9.satellite = 5;
;######### ACQUISITION GLOBAL CONFIG ############
Acquisition_B1.implementation=BEIDOU_B1I_PCPS_Acquisition
Acquisition_B1.item_type=gr_complex
Acquisition_B1.coherent_integration_time_ms=1
Acquisition_B1.pfa=0.01
;Acquisition_B1.pfa=0.0000001;
Acquisition_B1.doppler_max=10000
Acquisition_B1.doppler_step=100
Acquisition_B1.dump=true
Acquisition_B1.dump_filename=./bds_acq
Acquisition_B1.blocking=false;
Acquisition_B1.bit_transition_flag = false;
;######### TRACKING GLOBAL CONFIG ############
Tracking_B1.implementation=BEIDOU_B1I_DLL_PLL_Tracking
Tracking_B1.item_type=gr_complex
Tracking_B1.pll_bw_hz=25.0;
Tracking_B1.dll_bw_hz=2.50;
Tracking_B1.dump=false;
Tracking_B1.dump_filename=./epl_tracking_ch_
;######### TELEMETRY DECODER GPS CONFIG ############
TelemetryDecoder_B1.implementation=BEIDOU_B1I_Telemetry_Decoder
TelemetryDecoder_B1.dump=false
;######### OBSERVABLES CONFIG ############
Observables.implementation=Hybrid_Observables
Observables.dump=false
Observables.dump_filename=./observables.dat
;######### PVT CONFIG ############
PVT.implementation=RTKLIB_PVT
PVT.positioning_mode=Single ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic
PVT.iono_model=Broadcast ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX
PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad
PVT.output_rate_ms=100
PVT.display_rate_ms=500
PVT.dump_filename=./PVT
PVT.nmea_dump_filename=./gnss_sdr_pvt.nmea;
PVT.flag_nmea_tty_port=false;
PVT.nmea_dump_devname=/dev/pts/4
PVT.flag_rtcm_server=false
PVT.flag_rtcm_tty_port=false
PVT.rtcm_dump_devname=/dev/pts/1
PVT.dump=true
PVT.rinex_version=3
PVT.rinex_output_enabled=true
PVT.gpx_output_enabled=true

Some files were not shown because too many files have changed in this diff Show More