Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5d0ff3556a | |||
| ec7636d7aa | |||
| 30d655f9aa | |||
| 63578ee1ea | |||
| d41b40eece | |||
| d3ea50fd6a | |||
| c3b11b531e | |||
| 0c1bc4c18f | |||
| e4fc1c7e03 | |||
| 56e448d161 | |||
| 4ed9b1c284 | |||
| 7da2ecacbd | |||
| bb967df728 | |||
| d4fc3a5463 | |||
| 45e10d80d2 | |||
| 8e2ae905dd | |||
| f1f7238d73 | |||
| 171a8db4d0 | |||
| 546ab0feb5 | |||
| f4ff92ce15 | |||
| b6f284f553 | |||
| ef1190bf03 | |||
| d374054f2f | |||
| a7e2d50fb2 | |||
| b77b59f090 |
@@ -1,68 +0,0 @@
|
||||
# Generated from CLion C/C++ Code Style settings
|
||||
BasedOnStyle: LLVM
|
||||
AccessModifierOffset: -4
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveAssignments: None
|
||||
AlignOperands: DontAlign
|
||||
AllowAllParametersOfDeclarationOnNextLine: true
|
||||
AllowShortBlocksOnASingleLine: Empty
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: None
|
||||
AllowShortIfStatementsOnASingleLine: Never
|
||||
AllowShortLambdasOnASingleLine: Empty
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakTemplateDeclarations: Yes
|
||||
BinPackArguments: false
|
||||
BreakBeforeBraces: Custom
|
||||
BraceWrapping:
|
||||
AfterCaseLabel: false
|
||||
AfterClass: true
|
||||
AfterStruct: true
|
||||
AfterControlStatement: Never
|
||||
AfterEnum: true
|
||||
AfterFunction: true
|
||||
AfterNamespace: true
|
||||
AfterUnion: true
|
||||
BeforeCatch: true
|
||||
BeforeElse: true
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: false
|
||||
SplitEmptyRecord: true
|
||||
BreakBeforeBinaryOperators: NonAssignment
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializers: BeforeComma
|
||||
BreakInheritanceList: BeforeColon
|
||||
ColumnLimit: 100
|
||||
CompactNamespaces: false
|
||||
ContinuationIndentWidth: 4
|
||||
IndentCaseLabels: true
|
||||
IndentPPDirectives: None
|
||||
IndentWidth: 4
|
||||
InsertBraces: false
|
||||
KeepEmptyLinesAtTheStartOfBlocks: true
|
||||
MaxEmptyLinesToKeep: 2
|
||||
NamespaceIndentation: None
|
||||
ObjCSpaceAfterProperty: false
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
PackConstructorInitializers: Never
|
||||
PointerAlignment: Left
|
||||
ReflowComments: true
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceAfterLogicalNot: false
|
||||
SpaceAfterTemplateKeyword: false
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeCpp11BracedList: true
|
||||
SpaceBeforeCtorInitializerColon: true
|
||||
SpaceBeforeInheritanceColon: false
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceBeforeRangeBasedForLoopColon: true
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 0
|
||||
SpacesInAngles: false
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInContainerLiterals: false
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
TabWidth: 4
|
||||
UseTab: Never
|
||||
-491
@@ -1,491 +0,0 @@
|
||||
---
|
||||
Checks: 'clang-diagnostic-*,clang-analyzer-*,boost-*,bugprone-*,
|
||||
performance-*,readability-*,portability-*,modernize-*,cppcoreguidelines-*,
|
||||
concurrency-*,-modernize-use-trailing-return-type, -modernize-use-nodiscard,
|
||||
-readability-redundant-access-specifiers,-readability-qualified-auto'
|
||||
WarningsAsErrors: ''
|
||||
HeaderFilterRegex: ''
|
||||
AnalyzeTemporaryDtors: false
|
||||
FormatStyle: file
|
||||
User: florians
|
||||
CheckOptions:
|
||||
- key: readability-suspicious-call-argument.PrefixSimilarAbove
|
||||
value: '30'
|
||||
- key: cppcoreguidelines-no-malloc.Reallocations
|
||||
value: '::realloc'
|
||||
- key: cppcoreguidelines-owning-memory.LegacyResourceConsumers
|
||||
value: '::free;::realloc;::freopen;::fclose'
|
||||
- key: bugprone-reserved-identifier.Invert
|
||||
value: 'false'
|
||||
- key: bugprone-narrowing-conversions.PedanticMode
|
||||
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: modernize-use-auto.MinTypeNameLength
|
||||
value: '5'
|
||||
- key: cppcoreguidelines-macro-usage.CheckCapsOnly
|
||||
value: 'false'
|
||||
- key: readability-inconsistent-declaration-parameter-name.Strict
|
||||
value: 'false'
|
||||
- key: readability-suspicious-call-argument.DiceDissimilarBelow
|
||||
value: '60'
|
||||
- key: bugprone-assert-side-effect.IgnoredFunctions
|
||||
value: __builtin_expect
|
||||
- key: readability-suspicious-call-argument.Equality
|
||||
value: 'true'
|
||||
- key: bugprone-easily-swappable-parameters.QualifiersMix
|
||||
value: 'false'
|
||||
- key: bugprone-suspicious-string-compare.WarnOnImplicitComparison
|
||||
value: 'true'
|
||||
- key: bugprone-argument-comment.CommentNullPtrs
|
||||
value: '0'
|
||||
- key: cppcoreguidelines-narrowing-conversions.WarnOnFloatingPointNarrowingConversion
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-init-variables.IncludeStyle
|
||||
value: llvm
|
||||
- key: modernize-use-nodiscard.ReplacementString
|
||||
value: '[[nodiscard]]'
|
||||
- key: modernize-loop-convert.MakeReverseRangeHeader
|
||||
value: ''
|
||||
- key: readability-suspicious-call-argument.SuffixSimilarAbove
|
||||
value: '30'
|
||||
- key: cppcoreguidelines-narrowing-conversions.WarnOnIntegerNarrowingConversion
|
||||
value: 'true'
|
||||
- key: bugprone-easily-swappable-parameters.IgnoredParameterNames
|
||||
value: '"";iterator;Iterator;begin;Begin;end;End;first;First;last;Last;lhs;LHS;rhs;RHS'
|
||||
- key: modernize-loop-convert.UseCxx20ReverseRanges
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-prefer-member-initializer.UseAssignment
|
||||
value: 'false'
|
||||
- key: performance-type-promotion-in-math-fn.IncludeStyle
|
||||
value: llvm
|
||||
- key: readability-function-cognitive-complexity.DescribeBasicIncrements
|
||||
value: 'true'
|
||||
- key: bugprone-suspicious-include.ImplementationFileExtensions
|
||||
value: 'c;cc;cpp;cxx'
|
||||
- key: modernize-loop-convert.MakeReverseRangeFunction
|
||||
value: ''
|
||||
- key: readability-inconsistent-declaration-parameter-name.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: bugprone-suspicious-missing-comma.SizeThreshold
|
||||
value: '5'
|
||||
- key: readability-identifier-naming.IgnoreFailedSplit
|
||||
value: 'false'
|
||||
- key: readability-qualified-auto.AddConstToQualified
|
||||
value: 'true'
|
||||
- key: bugprone-sizeof-expression.WarnOnSizeOfThis
|
||||
value: 'true'
|
||||
- key: bugprone-string-constructor.WarnOnLargeLength
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-explicit-virtual-functions.OverrideSpelling
|
||||
value: override
|
||||
- key: readability-uppercase-literal-suffix.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: modernize-make-shared.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: bugprone-dynamic-static-initializers.HeaderFileExtensions
|
||||
value: ';h;hh;hpp;hxx'
|
||||
- key: bugprone-suspicious-enum-usage.StrictMode
|
||||
value: 'false'
|
||||
- key: performance-unnecessary-copy-initialization.AllowedTypes
|
||||
value: ''
|
||||
- key: bugprone-suspicious-missing-comma.MaxConcatenatedTokens
|
||||
value: '5'
|
||||
- key: modernize-use-transparent-functors.SafeMode
|
||||
value: 'false'
|
||||
- key: readability-suspicious-call-argument.Levenshtein
|
||||
value: 'true'
|
||||
- key: bugprone-not-null-terminated-result.WantToUseSafeFunctions
|
||||
value: 'true'
|
||||
- key: bugprone-string-constructor.LargeLengthThreshold
|
||||
value: '8388608'
|
||||
- key: readability-simplify-boolean-expr.ChainedConditionalAssignment
|
||||
value: 'false'
|
||||
- key: cppcoreguidelines-avoid-magic-numbers.IgnoreAllFloatingPointValues
|
||||
value: 'false'
|
||||
- key: cert-oop54-cpp.WarnOnlyIfThisHasSuspiciousField
|
||||
value: 'false'
|
||||
- key: bugprone-exception-escape.FunctionsThatShouldNotThrow
|
||||
value: ''
|
||||
- key: performance-inefficient-vector-operation.EnableProto
|
||||
value: 'false'
|
||||
- key: modernize-make-shared.MakeSmartPtrFunction
|
||||
value: 'std::make_shared'
|
||||
- key: modernize-loop-convert.MaxCopySize
|
||||
value: '16'
|
||||
- key: readability-suspicious-call-argument.PrefixDissimilarBelow
|
||||
value: '25'
|
||||
- key: readability-function-size.LineThreshold
|
||||
value: '4294967295'
|
||||
- key: bugprone-easily-swappable-parameters.MinimumLength
|
||||
value: '2'
|
||||
- key: portability-simd-intrinsics.Suggest
|
||||
value: 'false'
|
||||
- key: cppcoreguidelines-pro-bounds-constant-array-index.GslHeader
|
||||
value: ''
|
||||
- key: modernize-use-override.IgnoreDestructors
|
||||
value: 'false'
|
||||
- key: modernize-make-shared.MakeSmartPtrFunctionHeader
|
||||
value: '<memory>'
|
||||
- key: bugprone-sizeof-expression.WarnOnSizeOfConstant
|
||||
value: 'true'
|
||||
- key: readability-redundant-string-init.StringNames
|
||||
value: '::std::basic_string_view;::std::basic_string'
|
||||
- key: modernize-make-unique.IgnoreDefaultInitialization
|
||||
value: 'true'
|
||||
- key: modernize-use-emplace.ContainersWithPushBack
|
||||
value: '::std::vector;::std::list;::std::deque'
|
||||
- key: readability-magic-numbers.IgnoreBitFieldsWidths
|
||||
value: 'true'
|
||||
- key: modernize-make-unique.IncludeStyle
|
||||
value: llvm
|
||||
- key: modernize-use-override.OverrideSpelling
|
||||
value: override
|
||||
- key: readability-suspicious-call-argument.LevenshteinDissimilarBelow
|
||||
value: '50'
|
||||
- key: bugprone-argument-comment.CommentStringLiterals
|
||||
value: '0'
|
||||
- key: concurrency-mt-unsafe.FunctionSet
|
||||
value: any
|
||||
- key: readability-identifier-length.IgnoredExceptionVariableNames
|
||||
value: '^[e]$'
|
||||
- key: google-readability-braces-around-statements.ShortStatementLines
|
||||
value: '1'
|
||||
- key: bugprone-reserved-identifier.AllowedIdentifiers
|
||||
value: ''
|
||||
- key: cppcoreguidelines-pro-type-member-init.IgnoreArrays
|
||||
value: 'false'
|
||||
- key: readability-else-after-return.WarnOnUnfixable
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-avoid-magic-numbers.IgnoredFloatingPointValues
|
||||
value: '1.0;100.0;'
|
||||
- key: modernize-use-emplace.IgnoreImplicitConstructors
|
||||
value: 'false'
|
||||
- key: cppcoreguidelines-macro-usage.IgnoreCommandLineMacros
|
||||
value: 'true'
|
||||
- key: readability-suspicious-call-argument.Substring
|
||||
value: 'true'
|
||||
- key: modernize-use-equals-delete.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: readability-identifier-length.IgnoredVariableNames
|
||||
value: ''
|
||||
- key: readability-magic-numbers.IgnoreAllFloatingPointValues
|
||||
value: 'false'
|
||||
- key: cppcoreguidelines-pro-bounds-constant-array-index.IncludeStyle
|
||||
value: llvm
|
||||
- key: readability-suspicious-call-argument.Abbreviations
|
||||
value: 'arr=array;cnt=count;idx=index;src=source;stmt=statement;cpy=copy;dest=destination;dist=distancedst=distance;ptr=pointer;wdth=width;str=string;ln=line;srv=server;attr=attribute;ref=reference;buf=buffer;col=column;nr=number;vec=vector;len=length;elem=element;val=value;i=index;var=variable;hght=height;cl=client;num=number;pos=position;lst=list;addr=address'
|
||||
- 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: readability-uniqueptr-delete-release.PreferResetCall
|
||||
value: 'false'
|
||||
- key: readability-identifier-length.MinimumExceptionNameLength
|
||||
value: '2'
|
||||
- key: cppcoreguidelines-avoid-magic-numbers.IgnorePowersOf2IntegerValues
|
||||
value: 'false'
|
||||
- key: google-readability-namespace-comments.SpacesBeforeComments
|
||||
value: '2'
|
||||
- key: cppcoreguidelines-avoid-magic-numbers.IgnoreBitFieldsWidths
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-avoid-magic-numbers.IgnoredIntegerValues
|
||||
value: '1;2;3;4;'
|
||||
- key: cppcoreguidelines-no-malloc.Allocations
|
||||
value: '::malloc;::calloc'
|
||||
- key: bugprone-narrowing-conversions.IgnoreConversionFromTypes
|
||||
value: ''
|
||||
- key: readability-function-size.BranchThreshold
|
||||
value: '4294967295'
|
||||
- key: bugprone-suspicious-missing-comma.RatioThreshold
|
||||
value: '0.200000'
|
||||
- key: readability-implicit-bool-conversion.AllowIntegerConditions
|
||||
value: 'false'
|
||||
- key: readability-identifier-length.IgnoredParameterNames
|
||||
value: '^[n]$'
|
||||
- key: readability-function-size.StatementThreshold
|
||||
value: '800'
|
||||
- key: readability-identifier-naming.IgnoreMainLikeFunctions
|
||||
value: 'false'
|
||||
- key: cppcoreguidelines-init-variables.MathHeader
|
||||
value: '<math.h>'
|
||||
- key: google-readability-function-size.StatementThreshold
|
||||
value: '800'
|
||||
- key: bugprone-reserved-identifier.AggressiveDependentMemberLookup
|
||||
value: 'false'
|
||||
- key: readability-suspicious-call-argument.DiceSimilarAbove
|
||||
value: '70'
|
||||
- key: modernize-use-equals-default.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: readability-suspicious-call-argument.Abbreviation
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor
|
||||
value: 'false'
|
||||
- key: readability-identifier-length.MinimumLoopCounterNameLength
|
||||
value: '2'
|
||||
- key: modernize-use-emplace.SmartPointers
|
||||
value: '::std::shared_ptr;::std::unique_ptr;::std::auto_ptr;::std::weak_ptr'
|
||||
- key: cppcoreguidelines-no-malloc.Deallocations
|
||||
value: '::free'
|
||||
- key: bugprone-dangling-handle.HandleClasses
|
||||
value: 'std::basic_string_view;std::experimental::basic_string_view'
|
||||
- key: readability-magic-numbers.IgnorePowersOf2IntegerValues
|
||||
value: 'false'
|
||||
- key: readability-suspicious-call-argument.JaroWinklerSimilarAbove
|
||||
value: '85'
|
||||
- key: readability-simplify-subscript-expr.Types
|
||||
value: '::std::basic_string;::std::basic_string_view;::std::vector;::std::array'
|
||||
- key: performance-unnecessary-copy-initialization.ExcludedContainerTypes
|
||||
value: ''
|
||||
- key: modernize-replace-auto-ptr.IncludeStyle
|
||||
value: llvm
|
||||
- key: performance-move-const-arg.CheckTriviallyCopyableMove
|
||||
value: 'true'
|
||||
- key: readability-static-accessed-through-instance.NameSpecifierNestingThreshold
|
||||
value: '3'
|
||||
- key: readability-function-size.VariableThreshold
|
||||
value: '4294967295'
|
||||
- key: cert-dcl16-c.NewSuffixes
|
||||
value: 'L;LL;LU;LLU'
|
||||
- key: bugprone-narrowing-conversions.WarnOnFloatingPointNarrowingConversion
|
||||
value: 'true'
|
||||
- key: readability-identifier-naming.GetConfigPerFile
|
||||
value: 'true'
|
||||
- key: modernize-use-default-member-init.UseAssignment
|
||||
value: 'false'
|
||||
- key: readability-function-size.NestingThreshold
|
||||
value: '4294967295'
|
||||
- key: modernize-use-override.AllowOverrideAndFinal
|
||||
value: 'false'
|
||||
- key: cppcoreguidelines-narrowing-conversions.IgnoreConversionFromTypes
|
||||
value: ''
|
||||
- key: readability-function-size.ParameterThreshold
|
||||
value: '4294967295'
|
||||
- key: modernize-pass-by-value.ValuesOnly
|
||||
value: 'false'
|
||||
- key: readability-function-cognitive-complexity.IgnoreMacros
|
||||
value: 'false'
|
||||
- key: modernize-loop-convert.IncludeStyle
|
||||
value: llvm
|
||||
- key: cert-str34-c.DiagnoseSignedUnsignedCharComparisons
|
||||
value: 'false'
|
||||
- key: bugprone-narrowing-conversions.WarnWithinTemplateInstantiation
|
||||
value: 'false'
|
||||
- key: cert-err33-c.CheckedFunctions
|
||||
value: '::aligned_alloc;::asctime_s;::at_quick_exit;::atexit;::bsearch;::bsearch_s;::btowc;::c16rtomb;::c32rtomb;::calloc;::clock;::cnd_broadcast;::cnd_init;::cnd_signal;::cnd_timedwait;::cnd_wait;::ctime_s;::fclose;::fflush;::fgetc;::fgetpos;::fgets;::fgetwc;::fopen;::fopen_s;::fprintf;::fprintf_s;::fputc;::fputs;::fputwc;::fputws;::fread;::freopen;::freopen_s;::fscanf;::fscanf_s;::fseek;::fsetpos;::ftell;::fwprintf;::fwprintf_s;::fwrite;::fwscanf;::fwscanf_s;::getc;::getchar;::getenv;::getenv_s;::gets_s;::getwc;::getwchar;::gmtime;::gmtime_s;::localtime;::localtime_s;::malloc;::mbrtoc16;::mbrtoc32;::mbsrtowcs;::mbsrtowcs_s;::mbstowcs;::mbstowcs_s;::memchr;::mktime;::mtx_init;::mtx_lock;::mtx_timedlock;::mtx_trylock;::mtx_unlock;::printf_s;::putc;::putwc;::raise;::realloc;::remove;::rename;::scanf;::scanf_s;::setlocale;::setvbuf;::signal;::snprintf;::snprintf_s;::sprintf;::sprintf_s;::sscanf;::sscanf_s;::strchr;::strerror_s;::strftime;::strpbrk;::strrchr;::strstr;::strtod;::strtof;::strtoimax;::strtok;::strtok_s;::strtol;::strtold;::strtoll;::strtoul;::strtoull;::strtoumax;::strxfrm;::swprintf;::swprintf_s;::swscanf;::swscanf_s;::thrd_create;::thrd_detach;::thrd_join;::thrd_sleep;::time;::timespec_get;::tmpfile;::tmpfile_s;::tmpnam;::tmpnam_s;::tss_create;::tss_get;::tss_set;::ungetc;::ungetwc;::vfprintf;::vfprintf_s;::vfscanf;::vfscanf_s;::vfwprintf;::vfwprintf_s;::vfwscanf;::vfwscanf_s;::vprintf_s;::vscanf;::vscanf_s;::vsnprintf;::vsnprintf_s;::vsprintf;::vsprintf_s;::vsscanf;::vsscanf_s;::vswprintf;::vswprintf_s;::vswscanf;::vswscanf_s;::vwprintf_s;::vwscanf;::vwscanf_s;::wcrtomb;::wcschr;::wcsftime;::wcspbrk;::wcsrchr;::wcsrtombs;::wcsrtombs_s;::wcsstr;::wcstod;::wcstof;::wcstoimax;::wcstok;::wcstok_s;::wcstol;::wcstold;::wcstoll;::wcstombs;::wcstombs_s;::wcstoul;::wcstoull;::wcstoumax;::wcsxfrm;::wctob;::wctrans;::wctype;::wmemchr;::wprintf_s;::wscanf;::wscanf_s;'
|
||||
- key: bugprone-suspicious-string-compare.WarnOnLogicalNotComparison
|
||||
value: 'false'
|
||||
- key: readability-redundant-smartptr-get.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-explicit-virtual-functions.AllowOverrideAndFinal
|
||||
value: 'false'
|
||||
- key: readability-identifier-naming.AggressiveDependentMemberLookup
|
||||
value: 'false'
|
||||
- key: readability-identifier-length.MinimumParameterNameLength
|
||||
value: '2'
|
||||
- key: modernize-use-emplace.TupleTypes
|
||||
value: '::std::pair;::std::tuple'
|
||||
- key: modernize-use-emplace.TupleMakeFunctions
|
||||
value: '::std::make_pair;::std::make_tuple'
|
||||
- key: bugprone-narrowing-conversions.WarnOnIntegerToFloatingPointNarrowingConversion
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-owning-memory.LegacyResourceProducers
|
||||
value: '::malloc;::aligned_alloc;::realloc;::calloc;::fopen;::freopen;::tmpfile'
|
||||
- key: bugprone-easily-swappable-parameters.SuppressParametersUsedTogether
|
||||
value: 'true'
|
||||
- key: bugprone-argument-comment.StrictMode
|
||||
value: '0'
|
||||
- key: modernize-replace-random-shuffle.IncludeStyle
|
||||
value: llvm
|
||||
- key: modernize-use-bool-literals.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: bugprone-unhandled-self-assignment.WarnOnlyIfThisHasSuspiciousField
|
||||
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: bugprone-easily-swappable-parameters.NamePrefixSuffixSilenceDissimilarityTreshold
|
||||
value: '1'
|
||||
- key: readability-suspicious-call-argument.Suffix
|
||||
value: 'true'
|
||||
- key: readability-suspicious-call-argument.JaroWinklerDissimilarBelow
|
||||
value: '75'
|
||||
- key: modernize-use-noexcept.ReplacementString
|
||||
value: ''
|
||||
- key: modernize-use-override.FinalSpelling
|
||||
value: final
|
||||
- key: modernize-use-using.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-explicit-virtual-functions.FinalSpelling
|
||||
value: final
|
||||
- key: readability-suspicious-call-argument.MinimumIdentifierNameLength
|
||||
value: '3'
|
||||
- key: bugprone-narrowing-conversions.WarnOnIntegerNarrowingConversion
|
||||
value: 'true'
|
||||
- key: modernize-loop-convert.NamingStyle
|
||||
value: CamelCase
|
||||
- key: cppcoreguidelines-pro-type-member-init.UseAssignment
|
||||
value: 'false'
|
||||
- key: bugprone-suspicious-include.HeaderFileExtensions
|
||||
value: ';h;hh;hpp;hxx'
|
||||
- key: performance-no-automatic-move.AllowedTypes
|
||||
value: ''
|
||||
- key: readability-suspicious-call-argument.SubstringDissimilarBelow
|
||||
value: '40'
|
||||
- key: bugprone-argument-comment.CommentIntegerLiterals
|
||||
value: '0'
|
||||
- key: bugprone-stringview-nullptr.IncludeStyle
|
||||
value: llvm
|
||||
- key: performance-for-range-copy.WarnOnAllAutoCopies
|
||||
value: 'false'
|
||||
- key: modernize-pass-by-value.IncludeStyle
|
||||
value: llvm
|
||||
- key: bugprone-argument-comment.CommentFloatLiterals
|
||||
value: '0'
|
||||
- key: bugprone-too-small-loop-variable.MagnitudeBitsUpperLimit
|
||||
value: '16'
|
||||
- key: readability-simplify-boolean-expr.ChainedConditionalReturn
|
||||
value: 'false'
|
||||
- key: readability-else-after-return.WarnOnConditionVariables
|
||||
value: 'true'
|
||||
- key: modernize-use-nullptr.NullMacros
|
||||
value: 'NULL'
|
||||
- key: readability-suspicious-call-argument.SuffixDissimilarBelow
|
||||
value: '25'
|
||||
- key: bugprone-argument-comment.CommentCharacterLiterals
|
||||
value: '0'
|
||||
- key: cppcoreguidelines-macro-usage.AllowedRegexp
|
||||
value: '^DEBUG_*'
|
||||
- key: readability-suspicious-call-argument.LevenshteinSimilarAbove
|
||||
value: '66'
|
||||
- key: cppcoreguidelines-narrowing-conversions.PedanticMode
|
||||
value: 'false'
|
||||
- key: modernize-make-shared.IgnoreDefaultInitialization
|
||||
value: 'true'
|
||||
- key: readability-suspicious-call-argument.JaroWinkler
|
||||
value: 'true'
|
||||
- key: bugprone-implicit-widening-of-multiplication-result.UseCXXHeadersInCppSources
|
||||
value: 'true'
|
||||
- key: modernize-make-shared.IncludeStyle
|
||||
value: llvm
|
||||
- key: readability-suspicious-call-argument.Prefix
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-special-member-functions.AllowMissingMoveFunctions
|
||||
value: 'false'
|
||||
- key: bugprone-implicit-widening-of-multiplication-result.UseCXXStaticCastsInCppSources
|
||||
value: 'true'
|
||||
- key: bugprone-signed-char-misuse.CharTypdefsToIgnore
|
||||
value: ''
|
||||
- key: cppcoreguidelines-explicit-virtual-functions.IgnoreDestructors
|
||||
value: 'false'
|
||||
- key: modernize-make-unique.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: performance-for-range-copy.AllowedTypes
|
||||
value: ''
|
||||
- key: bugprone-argument-comment.CommentBoolLiterals
|
||||
value: '0'
|
||||
- key: readability-braces-around-statements.ShortStatementLines
|
||||
value: '0'
|
||||
- key: bugprone-argument-comment.CommentUserDefinedLiterals
|
||||
value: '0'
|
||||
- key: readability-magic-numbers.IgnoredFloatingPointValues
|
||||
value: '1.0;100.0;'
|
||||
- key: performance-inefficient-string-concatenation.StrictMode
|
||||
value: 'false'
|
||||
- key: readability-redundant-declaration.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: bugprone-easily-swappable-parameters.IgnoredParameterTypeSuffixes
|
||||
value: 'bool;Bool;_Bool;it;It;iterator;Iterator;inputit;InputIt;forwardit;ForwardIt;bidirit;BidirIt;constiterator;const_iterator;Const_Iterator;Constiterator;ConstIterator;RandomIt;randomit;random_iterator;ReverseIt;reverse_iterator;reverse_const_iterator;ConstReverseIterator;Const_Reverse_Iterator;const_reverse_iterator;Constreverseiterator;constreverseiterator'
|
||||
- key: modernize-make-unique.MakeSmartPtrFunction
|
||||
value: 'std::make_unique'
|
||||
- key: portability-restrict-system-includes.Includes
|
||||
value: '*'
|
||||
- key: readability-implicit-bool-conversion.AllowPointerConditions
|
||||
value: 'true'
|
||||
- key: modernize-make-unique.MakeSmartPtrFunctionHeader
|
||||
value: '<memory>'
|
||||
- key: bugprone-signal-handler.AsyncSafeFunctionSet
|
||||
value: POSIX
|
||||
- key: bugprone-easily-swappable-parameters.ModelImplicitConversions
|
||||
value: 'true'
|
||||
- key: readability-suspicious-call-argument.SubstringSimilarAbove
|
||||
value: '50'
|
||||
- key: cppcoreguidelines-narrowing-conversions.WarnWithinTemplateInstantiation
|
||||
value: 'false'
|
||||
- key: readability-identifier-length.MinimumVariableNameLength
|
||||
value: '2'
|
||||
- key: cppcoreguidelines-narrowing-conversions.WarnOnEquivalentBitWidth
|
||||
value: 'true'
|
||||
- key: cppcoreguidelines-non-private-member-variables-in-classes.IgnorePublicMemberVariables
|
||||
value: 'false'
|
||||
- key: cppcoreguidelines-special-member-functions.AllowMissingMoveFunctionsWhenCopyIsDeleted
|
||||
value: 'false'
|
||||
- key: modernize-use-noexcept.UseNoexceptFalse
|
||||
value: 'true'
|
||||
- key: readability-function-cognitive-complexity.Threshold
|
||||
value: '25'
|
||||
- key: cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
|
||||
value: 'true'
|
||||
- key: bugprone-argument-comment.IgnoreSingleArgument
|
||||
value: '0'
|
||||
- key: bugprone-narrowing-conversions.WarnOnEquivalentBitWidth
|
||||
value: 'true'
|
||||
- key: bugprone-sizeof-expression.WarnOnSizeOfIntegerExpression
|
||||
value: 'false'
|
||||
- key: performance-faster-string-find.StringLikeClasses
|
||||
value: '::std::basic_string;::std::basic_string_view'
|
||||
- key: cppcoreguidelines-narrowing-conversions.WarnOnIntegerToFloatingPointNarrowingConversion
|
||||
value: 'true'
|
||||
- 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,NSAssert,NSCAssert
|
||||
- key: bugprone-exception-escape.IgnoredExceptions
|
||||
value: ''
|
||||
- key: bugprone-signed-char-misuse.DiagnoseSignedUnsignedCharComparisons
|
||||
value: 'true'
|
||||
- key: modernize-use-default-member-init.IgnoreMacros
|
||||
value: 'true'
|
||||
- key: llvm-qualified-auto.AddConstToQualified
|
||||
value: 'false'
|
||||
- key: llvm-else-after-return.WarnOnConditionVariables
|
||||
value: 'false'
|
||||
- key: bugprone-sizeof-expression.WarnOnSizeOfCompareToConstant
|
||||
value: 'true'
|
||||
- key: modernize-raw-string-literal.DelimiterStem
|
||||
value: lit
|
||||
- key: readability-suspicious-call-argument.Dice
|
||||
value: 'true'
|
||||
- key: readability-identifier-length.IgnoredLoopCounterNames
|
||||
value: '^[ijk_]$'
|
||||
- key: modernize-raw-string-literal.ReplaceShorterLiterals
|
||||
value: 'false'
|
||||
- key: readability-magic-numbers.IgnoredIntegerValues
|
||||
value: '1;2;3;4;'
|
||||
- key: performance-inefficient-vector-operation.VectorLikeClasses
|
||||
value: '::std::vector'
|
||||
- key: modernize-use-auto.RemoveStars
|
||||
value: 'false'
|
||||
- key: bugprone-implicit-widening-of-multiplication-result.IncludeStyle
|
||||
value: llvm
|
||||
- key: portability-simd-intrinsics.Std
|
||||
value: ''
|
||||
- key: performance-unnecessary-value-param.IncludeStyle
|
||||
value: llvm
|
||||
- key: readability-redundant-member-init.IgnoreBaseInCopyConstructors
|
||||
value: 'false'
|
||||
- key: modernize-replace-disallow-copy-and-assign-macro.MacroName
|
||||
value: DISALLOW_COPY_AND_ASSIGN
|
||||
- key: llvm-else-after-return.WarnOnUnfixable
|
||||
value: 'false'
|
||||
...
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
78d0fc786aece120146b5c7a2367b593d3498e43
|
||||
eef27b845f5409dafbe3434ef16cd0fd3c06b311
|
||||
a5bfba266593eeea4e1970b03b01ce360511d67d
|
||||
bfc8111d19e05f578e4f0567cb93a6288c8f39ee
|
||||
e901e584acaa1de1aa817448dbf1936f17c7f474
|
||||
3da6ced354983790f027514284a4aab1daf33022
|
||||
4543c982670a0d6044ebed7812ac7df43feb1c4a
|
||||
c4b1ec01baed0a6e2698fc2f8d6557193f6b15df
|
||||
2a8c1271d53bb9d4daad270e729661b7a35d7337
|
||||
7c43b059df1b33ceffb3aa57d7e2b162a310f5e1
|
||||
5bd5f3a9637c09a2537b5563c244c5db87b8a14a
|
||||
5abfdb140531c1c59254eb5dc4a62cb6bbd60e34
|
||||
298c67787377a06aee01d76477ba696b1335307b
|
||||
d5f6c096b8089d5835a22a80667b00eda6721526
|
||||
d84071275a76cea3ae96f12be6405e12305c98c7
|
||||
bfdffb50beb8064b15f3eaadee983c7c95ae57bd
|
||||
59fcb80a801e94248ae3184a0d8ca67745c96954
|
||||
31c0099a59ab76ac7282f60bb8308fad5ac59ddd
|
||||
67381e957984c0a3958e5c71f605f9a8a2fa3c5a
|
||||
a3cb87b11763504f86aac23a640ebf3cb840034a
|
||||
b75cd3dd522c7c2589016160f5bb342ea6a7ed94
|
||||
ae7cb9e30081b0c23643e69ff08d0d836b03b5f2
|
||||
8fb5c657365efb3fddce465b98ce8f5b39eca5f6
|
||||
c7f9874422ecccc791f35b02da521dcf76e60b22
|
||||
9d4b58ae85bfbac752b439b4146f8a0c119fd436
|
||||
d9237989467a036fa0095917b15ed30a34a1846a
|
||||
f11783a49876564eec5c9f6f9f0215db810fb1c4
|
||||
6f11ed298a9896c2b693cb2a5c6d540467496ca0
|
||||
4f308dc03cbb1d67482ba41d251a3c6bd8e9b194
|
||||
b2ffebf1c0ecee57bf5329f4d2546fd98f3f6399
|
||||
53bb216b571bdbacb5ac978a5ac3f6e5cd13c23f
|
||||
d38f18af23bfa76138d1c8b5e87672d57f3734eb
|
||||
1baf5da3cfb24d9fcc1a1389cbd502f60002e7ab
|
||||
7fe10182a9c2a1ca97beb8a8e82742fae6a80c8d
|
||||
0c6786d4bfe1814119c00a2b2816f2770885386d
|
||||
cbdba0b5bb19ffc0ff5450a3ff63281ef03d8bd9
|
||||
a5135efd879abcfb34868c775f4178124ccd771c
|
||||
e0399e83c3d48c7d43fa2d1ed2ad1f6d52e68a0a
|
||||
3ef6811dae41b0d5aa2343feea37cca12c5d23e3
|
||||
c44ccc0ff231b7a91deb4425fa7b484725e98683
|
||||
cb21ac7bf8ac998be93849b75c8ff94e9b1c1b54
|
||||
1ee046788d50bb2512dfb4454d3e8f6c4aff0f9f
|
||||
190d64bdae81af46a60241af9b8f4a8e381248fb
|
||||
ec74d351f0c533da1626b05d1db9e20b678a8f72
|
||||
1e9236abd416f998ccc3d052556338d4988ea709
|
||||
bac451cc537be8beb4826c89fd4429ca73e69f4d
|
||||
5f31fb74f6445fda5632b5f2545362f85a379c74
|
||||
6f230d740401f914d5340a4b4be1a1c1df7b444a
|
||||
0a65575c2c1b23fcae6354277fee264df6d163d8
|
||||
702238a99c80ff2e6c91b4880f91bb38ab7833ac
|
||||
35156cdce3b2716071e994467c607e5175693a12
|
||||
bb0e2f1c5186ae3008b9aad1f0ba3e35370d18db
|
||||
b13088664fea77e6ac4779dddfdea7aac3c50b30
|
||||
1ea364379f64314ea47549a2f625c34eafdd262d
|
||||
3b42d4aface8c64feb9c86533f3b847e9aa9c563
|
||||
bedf9207023d6d594f2c03d2a8d799b34759a8fb
|
||||
132a1d7e55eadd0cb5a09760d471780eb5bd9340
|
||||
3ef438eaf03f840958a2f7a9ec585a3d2728e447
|
||||
c726b69d7ede5b1af82407c515e14375f3358be3
|
||||
390e09db3258e4807a3d4b2993c1723480ae5350
|
||||
57d0c2000ae29d3160e0aa908ed1e027b321e36a
|
||||
b389f6e602eb42c07c21f37fbcd451e28dd9fbc4
|
||||
48365a1df5286c7a5608cd3a5cce0def5e4d5380
|
||||
dc5b3cb495002951c3a36c928c55108b0999bc3e
|
||||
875f9eaad6a59abd70775c0b67a7f10d92128a5a
|
||||
7a8a453746a8e4a845219948591fd17f4494a067
|
||||
8b31d7deb09077bc0cce0ecf6de02c94db262a67
|
||||
4a7e1b6d9b12df211cf6fbec61cc8544e4c6bf9d
|
||||
129d5882a729327a72b57ec695bb376e84205bd0
|
||||
2ae7cc4a94c1ab1dfc0264367c5da4716ea02bfe
|
||||
987b4bda2ac8570969dc07fa887bda420f77e441
|
||||
ec899d75c6abf45d7ee4dd91ea0f8141a9818446
|
||||
233a337ca5d693e4773fecf1de14325752afd658
|
||||
9271b6d433578f65df9b469131ece4e4bdbb19aa
|
||||
2637527e3a4e132506e8c074b752721d66ae146a
|
||||
@@ -0,0 +1,18 @@
|
||||
#git archive --worktree-attributes --prefix=freecad-0.13/ --output=freecad.tar.gz HEAD
|
||||
acinclude.m4 export-ignore
|
||||
autogen.sh export-ignore
|
||||
build.sh export-ignore
|
||||
BuildAll.bat export-ignore
|
||||
BuildRelease.ini export-ignore
|
||||
BuildRelease.py export-ignore
|
||||
configure.ac export-ignore
|
||||
Makefile.am export-ignore
|
||||
mkinstalldirs export-ignore
|
||||
package export-ignore
|
||||
fc.sh export-ignore
|
||||
UpdateResources.bat export-ignore
|
||||
BuildVersion.bat export-ignore
|
||||
*.sln export-ignore
|
||||
WindowsInstaller export-ignore
|
||||
Version.h.in export-subst
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: FreeCAD
|
||||
liberapay: FreeCAD
|
||||
open_collective: freecad
|
||||
patreon: # Replace with a single Patreon username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: ["https://wiki.freecad.org/Donate"]
|
||||
@@ -1,19 +0,0 @@
|
||||
name: Request a Backport
|
||||
description: Suggest that a commit from the main development branch be backported to the next point release
|
||||
title: "[Backport] "
|
||||
labels: ["needs triage", "backport"]
|
||||
body:
|
||||
- type: input
|
||||
id: pull_request
|
||||
attributes:
|
||||
label: Original PR
|
||||
description: A link to the PR that contains the commits to be backported
|
||||
placeholder: https://github.com/FreeCAD/FreeCAD/pulls/1234
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Description and Justification
|
||||
description: Why should this PR (or individual commit) be backported?
|
||||
placeholder: Please explain why this PR or commit should be backported to the next point release.
|
||||
@@ -1,80 +0,0 @@
|
||||
name: Report a Problem
|
||||
description: File an problem report
|
||||
title: "[Problem] "
|
||||
labels: ["needs triage"]
|
||||
body:
|
||||
- type: checkboxes
|
||||
id: existing_issue
|
||||
attributes:
|
||||
label: Is there an existing issue for this?
|
||||
description: Please search to see if an issue already exists for the problem you encountered.
|
||||
options:
|
||||
- label: I have searched the existing issues
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: version
|
||||
attributes:
|
||||
label: Version
|
||||
description: What version of FreeCAD are you running?
|
||||
options:
|
||||
- 0.20 (Release)
|
||||
- 0.21 (Development)
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: full_version
|
||||
attributes:
|
||||
label: Full version info
|
||||
description: Please use the About FreeCAD dialog to copy your full version information and paste it here.
|
||||
render: shell
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: wb
|
||||
attributes:
|
||||
label: Subproject(s) affected?
|
||||
options:
|
||||
- Addon Manager
|
||||
- Arch
|
||||
- Core
|
||||
- Draft
|
||||
- Expressions
|
||||
- FEM
|
||||
- File formats
|
||||
- GCS
|
||||
- OpenSCAD
|
||||
- Part
|
||||
- PartDesign
|
||||
- Path
|
||||
- Project Tools & Websites
|
||||
- Sketcher
|
||||
- Spreadsheet
|
||||
- Techdraw
|
||||
- Other (specify in description)
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Problem description
|
||||
description: Describe the problem and how it impacts user experience, workflow, maintainability or speed of the code. If the problem appears to be a bug with the current functionality, provide as test case or recipe that reproduces the error.
|
||||
placeholder: Description of the problem
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: anything_else
|
||||
attributes:
|
||||
label: Anything else?
|
||||
description: |
|
||||
Links? References? Anything that will give us more context about the issue you are encountering!
|
||||
If there is a discussion about the problem on the forum, provide link(s) here.
|
||||
|
||||
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. To attach a FCStd file, ZIP it first (GitHub won't recognize the extension otherwise).
|
||||
validations:
|
||||
required: false
|
||||
- type: checkboxes
|
||||
id: terms
|
||||
attributes:
|
||||
label: Code of Conduct
|
||||
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/FreeCAD/FreeCAD/blob/master/CODE_OF_CONDUCT.md)
|
||||
options:
|
||||
- label: I agree to follow this project's Code of Conduct
|
||||
required: true
|
||||
@@ -1,5 +0,0 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: 💬 START HERE -- FreeCAD Forum
|
||||
url: https://forum.freecad.org/
|
||||
about: You are encouraged to discuss the problem you are seeing on the FreeCAD Forums before opening an issue on GitHub
|
||||
@@ -1,8 +0,0 @@
|
||||
Thank you for creating a pull request to contribute to FreeCAD! Place an "X" in between the brackets below to "check off" to confirm that you have satisfied the requirement, or ask for help in the [FreeCAD forum](https://forum.freecadweb.org/viewforum.php?f=10) if there is something you don't understand.
|
||||
|
||||
- [ ] Your Pull Request meets the requirements outlined in section 5 of [CONTRIBUTING.md](https://github.com/FreeCAD/FreeCAD/blob/master/CONTRIBUTING.md) for a Valid PR
|
||||
|
||||
Please remember to update the Wiki with the features added or changed once this PR is merged.
|
||||
**Note**: If you don't have wiki access, then please mention your contribution on the [1.0 Changelog Forum Thread](https://forum.freecad.org/viewtopic.php?f=10&t=69438).
|
||||
|
||||
---
|
||||
@@ -1,77 +0,0 @@
|
||||
aci
|
||||
ake
|
||||
aline
|
||||
alle
|
||||
alledges
|
||||
alocation
|
||||
anid
|
||||
anormal
|
||||
apoints
|
||||
aply
|
||||
appy
|
||||
ba
|
||||
beginn
|
||||
bloaded
|
||||
bottome
|
||||
childrens
|
||||
childs
|
||||
connexion
|
||||
currenty
|
||||
curvelinear
|
||||
detet
|
||||
doubleclick
|
||||
dum
|
||||
eiter
|
||||
ende
|
||||
extaction
|
||||
finde
|
||||
findn
|
||||
fle
|
||||
fo
|
||||
freez
|
||||
froms
|
||||
hist
|
||||
indicies
|
||||
inout
|
||||
isnt
|
||||
ist
|
||||
itsel
|
||||
lod
|
||||
mantatory
|
||||
mata
|
||||
methode
|
||||
modell
|
||||
nd
|
||||
nin
|
||||
normale
|
||||
normaly
|
||||
numer
|
||||
oce
|
||||
ontop
|
||||
ot
|
||||
parm
|
||||
parms
|
||||
programm
|
||||
propt
|
||||
rady
|
||||
recurrance
|
||||
rougly
|
||||
seh
|
||||
serie
|
||||
siz
|
||||
som
|
||||
strack
|
||||
substraction
|
||||
sur
|
||||
te
|
||||
thist
|
||||
tread
|
||||
ue
|
||||
upto
|
||||
uptodate
|
||||
usind
|
||||
vas
|
||||
vertexes
|
||||
vew
|
||||
wallthickness
|
||||
zuser
|
||||
@@ -1,63 +0,0 @@
|
||||
# Add 'source' label to any change to src files within the source dir EXCEPT for the docs sub-folder
|
||||
# source:
|
||||
# - any: ['src/**/*', '!src/docs/*']
|
||||
|
||||
Core:
|
||||
- 'src/App/**/*'
|
||||
- 'src/Base/**/*'
|
||||
- 'src/Gui/**/*'
|
||||
|
||||
:octocat::
|
||||
- '.github/**/*'
|
||||
|
||||
Addon Manager:
|
||||
- 'src/Mod/AddonManager/**/*'
|
||||
|
||||
WB Arch:
|
||||
- 'src/Mod/Arch/**/*'
|
||||
|
||||
WB Draft:
|
||||
- 'src/Mod/Draft/**/*'
|
||||
|
||||
WB FEM:
|
||||
- 'src/Mod/Fem/**/*'
|
||||
|
||||
WB Mesh:
|
||||
- 'src/Mod/Mesh/**/*'
|
||||
|
||||
WB MeshPart:
|
||||
- 'src/Mod/MeshPart/**/*'
|
||||
|
||||
WB OpenSCAD:
|
||||
- 'src/Mod/OpenSCAD/**/*'
|
||||
|
||||
WB Part:
|
||||
- 'src/Mod/Part/**/*'
|
||||
|
||||
WB PartDesign:
|
||||
- 'src/Mod/PartDesign/**/*'
|
||||
|
||||
WB Path:
|
||||
- 'src/Mod/Path/**/*'
|
||||
|
||||
WB Points:
|
||||
- 'src/Mod/Points/**/*'
|
||||
|
||||
WB ReverseEngineering:
|
||||
- 'src/Mod/ReverseEngineering/**/*'
|
||||
|
||||
WB Sketcher:
|
||||
- 'src/Mod/Sketcher/**/*'
|
||||
|
||||
WB Spreadsheet:
|
||||
- 'src/Mod/Spreadsheet/**/*'
|
||||
|
||||
WB Surface:
|
||||
- 'src/Mod/Surface/**/*/'
|
||||
|
||||
WB TechDraw:
|
||||
- 'src/Mod/TechDraw/**/*'
|
||||
|
||||
WB Test:
|
||||
- 'src/Mod/Test/**/*'
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "black-warning",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(would reformat (.*))$",
|
||||
"file": 2,
|
||||
"message": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "clang",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+):([0-9]+):([0-9]+): (error|warning|note): (.+)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"severity": 4,
|
||||
"message": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "codespell-matcher",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+):(\\d+):\\s+(.+)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"message": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "cpplint",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+):([0-9]+): (.+)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"message": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "grepMatcher-warning",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+):([0-9]+):(.+)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"message": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "pylint-error",
|
||||
"severity": "error",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+?):([0-9]+):([0-9]+): ([([E|F][0-9]+): (.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"code": 4,
|
||||
"message": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "pylint-warning",
|
||||
"severity": "warning",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+?):([0-9]+):([0-9]+): ([^E|F][0-9]+): (.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"code": 4,
|
||||
"message": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,110 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD 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 *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This workflow is a complementary one to the master CI.
|
||||
# It aims at doing cleanup operations after a CI workflow ran.
|
||||
# Being triggered when the master workflow ends allows it to run with necessary privileges.
|
||||
# Indeed it always run with push-like rights even for PR events.
|
||||
|
||||
# In order to work, this cleanup workflow imposes name formatting for caches
|
||||
# Caches that have to be cleaned (typically compiler caches) shall be named as below :
|
||||
# ${MARK}-${CONTEXT}-${REF}-${ID}
|
||||
# with :
|
||||
# ${MARK} => A mark identifying a cache to be cleaned, defined as being "FC" (without quotes)
|
||||
# ${CONTEXT} => A string identifying cache saving context, typically OS name or compiler name
|
||||
# ${REF} => The full reference of the branch owning the cache (starting with "/refs/pull/" or "/refs/heads/")
|
||||
# ${ID} => A cache unique identifier, generally an ascending number, in no case containing a '-' (hyphen) sign
|
||||
|
||||
name: FreeCAD CI cleaner
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: [FreeCAD master CI]
|
||||
types:
|
||||
- completed
|
||||
|
||||
env:
|
||||
dryrun: false
|
||||
|
||||
concurrency:
|
||||
group: FC-CI-cleaner
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
|
||||
CachesCleanup:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
logdir: /tmp/log/
|
||||
steps:
|
||||
- name: Make needed directories
|
||||
run: |
|
||||
mkdir -p ${{ env.logdir }}
|
||||
- name: Get existing caches for the repo
|
||||
run: |
|
||||
curl -H "Accept: application/vnd.github+json" -H "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/caches > ${{ env.logdir }}caches.json
|
||||
- name: Extract pull request caches
|
||||
run: |
|
||||
# Extract caches of which names starts with MARK and contains "/refs/pull/"
|
||||
jq ".actions_caches | map(select(.key | startswith(\"FC-\"))) | map(select(.key | contains(\"refs/pull/\")))" ${{ env.logdir }}caches.json > ${{ env.logdir }}pulls.json
|
||||
- name: Extract and delete pull request obsolete cache IDs
|
||||
run: |
|
||||
# Group the caches by MARK-CONTEXT-REF, sort by ascending last access datetime and keep all but the last as to be deleted
|
||||
# As a consequence, for pull requests, only the most recent cache is kept (one for each context and for each PR)
|
||||
PRID=$(jq "group_by(.key | .[:rindex(\"-\")]) | .[] | sort_by(.last_accessed_at) | .[:-1][].id" ${{ env.logdir }}pulls.json)
|
||||
for id in $PRID
|
||||
do
|
||||
echo "Trying to delete pull request obsolete cache ID : $id"
|
||||
if [ ${{ env.dryrun }} == "false" ]
|
||||
then
|
||||
curl -X DELETE -H "Accept: application/vnd.github+json" -H "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/caches/$id
|
||||
else
|
||||
echo "DRYRUN: executing : curl -X DELETE -H \"Accept: application/vnd.github+json\" $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/caches/$id"
|
||||
fi
|
||||
done
|
||||
- name: Extract push caches
|
||||
run: |
|
||||
# Extract caches of which names starts with MARK and contains "/refs/heads/"
|
||||
jq ".actions_caches | map(select(.key | startswith(\"FC-\"))) | map(select(.key | contains(\"refs/heads/\")))" ${{ env.logdir }}caches.json > ${{ env.logdir }}pushes.json
|
||||
- name: Extract and delete push obsolete cache IDs
|
||||
run: |
|
||||
# Group the caches by MARK-CONTEXT-REF, sort by ascending last access datetime, keep all but the last 2 and keep all accessed for more than 1 hour as to be deleted
|
||||
# As a consequence, for pushes (repo branches), at least 2 caches (for each context and for each branch) are kept, others are deleted if they have been useless for more than 1 hour
|
||||
PSID=$(jq "group_by(.key | .[:rindex(\"-\")]) | .[] | sort_by(.last_accessed_at) | .[:-2][] | select((.last_accessed_at | if contains(\".\") then .[:rindex(\".\")]+\"Z\" else . end | fromdateiso8601) < (now | floor - 3600)) | .id" ${{ env.logdir }}pushes.json)
|
||||
for id in $PSID
|
||||
do
|
||||
echo "Trying to delete push obsolete cache ID : $id"
|
||||
if [ ${{ env.dryrun }} == "false" ]
|
||||
then
|
||||
curl -X DELETE -H "Accept: application/vnd.github+json" -H "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/caches/$id
|
||||
else
|
||||
echo "DRYRUN: executing : curl -X DELETE -H \"Accept: application/vnd.github+json\" $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/caches/$id"
|
||||
fi
|
||||
done
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ github.job }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
@@ -1,74 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD 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 *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is the master workflow for CI of FreeCAD.
|
||||
# It (only) aims at properly organizing the sub-workflows.
|
||||
|
||||
name: FreeCAD master CI
|
||||
|
||||
on: [workflow_dispatch, push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: FC-CI-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
Prepare:
|
||||
uses: ./.github/workflows/sub_prepare.yml
|
||||
with:
|
||||
artifactBasename: Prepare-${{ github.run_id }}
|
||||
|
||||
Ubuntu_20-04:
|
||||
needs: [Prepare]
|
||||
uses: ./.github/workflows/sub_buildUbuntu2004.yml
|
||||
with:
|
||||
artifactBasename: Ubuntu_20-04-${{ github.run_id }}
|
||||
|
||||
Ubuntu_22-04:
|
||||
needs: [Prepare]
|
||||
uses: ./.github/workflows/sub_buildUbuntu2204.yml
|
||||
with:
|
||||
artifactBasename: Ubuntu_22-04-${{ github.run_id }}
|
||||
|
||||
Windows:
|
||||
needs: [Prepare]
|
||||
uses: ./.github/workflows/sub_buildWindows.yml
|
||||
with:
|
||||
artifactBasename: Windows-${{ github.run_id }}
|
||||
|
||||
Lint:
|
||||
needs: [Prepare]
|
||||
uses: ./.github/workflows/sub_lint.yml
|
||||
with:
|
||||
artifactBasename: Lint-${{ github.run_id }}
|
||||
changedFiles: ${{ needs.Prepare.outputs.changedFiles }}
|
||||
changedCppFiles: ${{ needs.Prepare.outputs.changedCppFiles }}
|
||||
changedPythonFiles: ${{ needs.Prepare.outputs.changedPythonFiles }}
|
||||
|
||||
WrapUp:
|
||||
needs: [Prepare, Ubuntu_20-04, Ubuntu_22-04, Windows, Lint]
|
||||
if: always()
|
||||
uses: ./.github/workflows/sub_wrapup.yml
|
||||
with:
|
||||
previousSteps: ${{ toJSON(needs) }}
|
||||
@@ -1,73 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD 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 *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
name: build
|
||||
description: "Linux: build application"
|
||||
|
||||
inputs:
|
||||
builddir:
|
||||
description: "Directory where build will happen"
|
||||
required: true
|
||||
logFile:
|
||||
description: "Path for log file"
|
||||
required: true
|
||||
errorFile:
|
||||
description: "Path to error file"
|
||||
required: true
|
||||
reportFile:
|
||||
description: "Path for report file"
|
||||
required: true
|
||||
extraParameters:
|
||||
description: "Extra parameters to CMake build"
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Build
|
||||
id: build
|
||||
shell: bash
|
||||
run: |
|
||||
(stdbuf -oL -eL cmake --build ${{ inputs.builddir }} -j$(nproc) ${{ inputs.extraParameters }}) \
|
||||
2> >(tee -a ${{ inputs.errorFile }}) | tee -a ${{ inputs.logFile }}
|
||||
- name: Write report
|
||||
shell: bash
|
||||
if: always()
|
||||
run: |
|
||||
if [ ${{ steps.build.outcome }} == 'success' ]
|
||||
then
|
||||
echo "<details><summary>:heavy_check_mark: CMake build succeeded</summary>" >> ${{ inputs.reportFile }}
|
||||
else
|
||||
echo "<details><summary>:fire: CMake build failed</summary>" >> ${{ inputs.reportFile }}
|
||||
fi
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
echo "Build Error Log (stderr output):" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
cat ${{ inputs.errorFile }} >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
echo "Build Log (only built targets reported):" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
cat ${{ inputs.logFile }} | sed -ne "/Built target/p" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
echo "</details>">> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
@@ -1,78 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD 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 *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
name: configure
|
||||
description: "Linux: configure CMake"
|
||||
|
||||
inputs:
|
||||
sourcedir:
|
||||
description: "Directory where sources are stored"
|
||||
required: false
|
||||
default: ./
|
||||
builddir:
|
||||
description: "Directory where build will happen"
|
||||
required: true
|
||||
logFile:
|
||||
description: "Path for log file"
|
||||
required: true
|
||||
errorFile:
|
||||
description: "Path to error file"
|
||||
required: true
|
||||
reportFile:
|
||||
description: "Path for report file"
|
||||
required: true
|
||||
extraParameters:
|
||||
description: "Extra parameters to CMake configure"
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Configure CMake
|
||||
id: configure
|
||||
shell: bash
|
||||
run: |
|
||||
(stdbuf -oL -eL cmake -S ${{ inputs.sourcedir }} -B ${{ inputs.builddir }} -D CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE ${{inputs.extraParameters }}) \
|
||||
2> >(tee -a ${{ inputs.errorFile }}) | tee -a ${{ inputs.logFile }}
|
||||
- name: Write report
|
||||
shell: bash
|
||||
if: always()
|
||||
run: |
|
||||
if [ ${{ steps.configure.outcome }} == 'success' ]
|
||||
then
|
||||
echo "<details><summary>:heavy_check_mark: CMake configure succeeded</summary>" >> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
echo "Configure Error Log (stderr output):" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
cat ${{ inputs.errorFile }} >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
else
|
||||
echo "<details><summary>:fire: CMake configure failed</summary>" >> ${{ inputs.reportFile }}
|
||||
fi
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
echo "Configure Log (only final configuration values reported):" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
cat ${{ inputs.logFile }} | sed -ne "/^ *==/,/^====/p" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
echo "</details>">> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
@@ -1,44 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD 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 *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
name: generateCacheKey
|
||||
description: "Linux: generates a cache key taking into account distro and compiler"
|
||||
|
||||
inputs:
|
||||
compiler:
|
||||
description: "Binary name/path of compiler to be used"
|
||||
required: true
|
||||
outputs:
|
||||
cacheKey:
|
||||
description: "Cache key with distro and compiler version"
|
||||
value: ${{ steps.generateCacheKey.outputs.cacheKey }}
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- id: generateCacheKey
|
||||
shell: bash
|
||||
run: |
|
||||
cacheKey=$(lsb_release -ds | tr -d ' ')-$( basename ${{ inputs.compiler }})$(${{ inputs.compiler }} -dumpfullversion -dumpversion)
|
||||
echo "Generated cache key : $cacheKey"
|
||||
echo "cacheKey=$cacheKey" >> $GITHUB_OUTPUT
|
||||
@@ -1,73 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD 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 *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
name: install
|
||||
description: "Linux: install application"
|
||||
|
||||
inputs:
|
||||
builddir:
|
||||
description: "Directory where build is stored"
|
||||
required: true
|
||||
logFile:
|
||||
description: "Path for log file"
|
||||
required: true
|
||||
errorFile:
|
||||
description: "Path to error file"
|
||||
required: true
|
||||
reportFile:
|
||||
description: "Path for report file"
|
||||
required: true
|
||||
extraParameters:
|
||||
description: "Extra parameters to CMake install"
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Install
|
||||
id: install
|
||||
shell: bash
|
||||
run: |
|
||||
(stdbuf -oL -eL sudo cmake --install ${{ inputs.builddir }} ${{ inputs.extraParameters }}) \
|
||||
2> >(tee -a ${{ inputs.errorFile }}) | tee -a ${{ inputs.logFile }}
|
||||
- name: Write report
|
||||
shell: bash
|
||||
if: always()
|
||||
run: |
|
||||
if [ ${{ steps.install.outcome }} == 'success' ]
|
||||
then
|
||||
echo "<details><summary>:heavy_check_mark: CMake install succeeded</summary>" >> ${{ inputs.reportFile }}
|
||||
else
|
||||
echo "<details><summary>:fire: CMake install failed</summary>" >> ${{ inputs.reportFile }}
|
||||
fi
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
echo "Install Error Log (stderr output):" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
cat ${{ inputs.errorFile }} >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
echo "Install Error Log (stdout output trimmed to the last 100 Lines):" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
tail -n 100 ${{ inputs.logFile }} >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
echo "</details>">> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
@@ -1,79 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 The FreeCAD Project Association *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD 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 *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# !!! Each step running a single test shall have an'id' defined so its report will be output
|
||||
|
||||
name: Run all C++ Tests
|
||||
description: "Run all C++ tests, generating logs and reports for each"
|
||||
|
||||
inputs:
|
||||
reportdir:
|
||||
description: "Report directory where logs will be stored"
|
||||
required: true
|
||||
builddir:
|
||||
description: "Build directory where tests are located"
|
||||
required: true
|
||||
reportFile:
|
||||
description: "Path for report file"
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: C++ core tests
|
||||
id: core
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Tests_run --gtest_output=json:${{ inputs.reportdir }}core_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}core_gtest_test_log.txt
|
||||
testName: Core
|
||||
- name: C++ Sketcher tests
|
||||
id: sketcher
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Sketcher_tests_run --gtest_output=json:${{ inputs.reportdir }}sketcher_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}sketcher_gtest_test_log.txt
|
||||
testName: Sketcher
|
||||
- name: Compose summary report based on test results
|
||||
if: always()
|
||||
shell: bash
|
||||
run: |
|
||||
# Print global result
|
||||
if [ ${{ job.status }} != "success" ]
|
||||
then
|
||||
echo "<details><summary>:fire: C++ tests failed</summary>" >> ${{ inputs.reportFile }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: C++ tests succeeded</summary>" >> ${{ inputs.reportFile }}
|
||||
fi
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
echo "<blockquote>" >> ${{ inputs.reportFile }}
|
||||
#Extract individual results
|
||||
cat > /tmp/data << "EOD"
|
||||
${{ toJSON(steps) }}
|
||||
EOD
|
||||
echo "$(jq -r ".[].outputs.reportText" /tmp/data)" >> ${{ inputs.reportFile }}
|
||||
# Close report
|
||||
echo "</blockquote>" >> ${{ inputs.reportFile }}
|
||||
echo "</details>" >> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * Copyright (c) 2023 FreeCAD Project Association *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD 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 *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
name: runCPPTests
|
||||
description: "Run C++ tests, generate log and report"
|
||||
|
||||
inputs:
|
||||
testCommand:
|
||||
description: "Test command to be run"
|
||||
required: true
|
||||
testLogFile:
|
||||
description: "Path for the command-line output of the tests"
|
||||
required: true
|
||||
testName:
|
||||
description: "A descriptive name for the test suite"
|
||||
required: true
|
||||
outputs:
|
||||
reportText:
|
||||
description: "Report text"
|
||||
value: ${{ steps.report.outputs.reportText }}
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Run C++ tests
|
||||
shell: bash
|
||||
run: stdbuf -oL -eL ${{ inputs.testCommand }} |& tee -a ${{ inputs.testLogFile }}
|
||||
- name: Parse test results
|
||||
if: always()
|
||||
id: report
|
||||
shell: bash
|
||||
run: |
|
||||
result=$(sed -ne "/Global test environment tear-down/,/^$/{/^$/d;p}" ${{ inputs.testLogFile }})
|
||||
if grep -qF "[ FAILED ]" <<< $result
|
||||
then
|
||||
reportText="<details><summary>:fire: GTest C++ test suite '${{ inputs.testName }}' failed</summary>\n"
|
||||
else
|
||||
reportText="<details><summary>:heavy_check_mark: GTest C++ test suite '${{ inputs.testName }}' succeeded</summary>\n"
|
||||
fi
|
||||
reportText+="\n"
|
||||
reportText+="Results\n"
|
||||
reportText+="\n"
|
||||
reportText+='```\n'
|
||||
reportText+="$result\n"
|
||||
reportText+='```\n'
|
||||
reportText+="</details>\n"
|
||||
reportText+="\n"
|
||||
echo "reportText<<EOD" >> $GITHUB_OUTPUT
|
||||
echo -e "$reportText" >> $GITHUB_OUTPUT
|
||||
echo "EOD" >> $GITHUB_OUTPUT
|
||||
echo -e "$reportText"
|
||||
@@ -1,81 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD 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 *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
name: runPythonTests
|
||||
description: "Run Python tests, generate log and report"
|
||||
|
||||
inputs:
|
||||
testDescription:
|
||||
description: "Test description text, will be used on report"
|
||||
required: true
|
||||
testCommand:
|
||||
description: "Test command to be run"
|
||||
required: true
|
||||
logFile:
|
||||
description: "Path for log file"
|
||||
required: true
|
||||
reportFile:
|
||||
description: "Path for report file"
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Run tests
|
||||
id: runTests
|
||||
shell: bash
|
||||
run: |
|
||||
stdbuf -oL -eL ${{ inputs.testCommand }} |& sed -Ee "/[[:blank:]]*\([[:digit:]]{1,3} %\)[[:blank:]]*/d" | tee -a ${{ inputs.logFile }}
|
||||
- name: Write report
|
||||
shell: bash
|
||||
if: always()
|
||||
run: |
|
||||
sed -ne "/^\(FAILED\|ERROR\):/,/^[[:blank:]]*$/bF; /^Traceback/,/^[^[:blank:]]/{/^Traceback/bT; /^[^[:blank:]]/G; bT}; b; :T w ${{ inputs.logFile }}_tracebacks" -e "b; :F w ${{ inputs.logFile }}_failedtests" ${{ inputs.logFile }}
|
||||
icon=""
|
||||
if [ $( cat ${{ inputs.logFile }}_tracebacks | wc -l ) -gt 0 ]
|
||||
then
|
||||
icon=" :fire:"
|
||||
fi
|
||||
if [ ${{ steps.runTests.outcome }} == 'success' ]
|
||||
then
|
||||
echo "<details><summary>:heavy_check_mark: ${{ inputs.testDescription }} succeeded$icon</summary>" >> ${{ inputs.reportFile }}
|
||||
else
|
||||
echo "<details><summary>:fire: ${{ inputs.testDescription }} failed$icon</summary>" >> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
echo "Failed tests" >> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
cat ${{ inputs.logFile }}_failedtests >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
fi
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
if [ $( cat ${{ inputs.logFile }}_tracebacks | wc -l ) -gt 0 ]
|
||||
then
|
||||
echo "Uncaught tracebacks -- these tracebacks appeared during test but didn't fail a test --" >> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
cat ${{ inputs.logFile }}_tracebacks >> ${{ inputs.reportFile }}
|
||||
echo '```' >> ${{ inputs.reportFile }}
|
||||
fi
|
||||
echo "</details>">> ${{ inputs.reportFile }}
|
||||
echo "" >> ${{ inputs.reportFile }}
|
||||
@@ -1,78 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD 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 *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This action aims at speeding up CI and reduce dependency to external resources
|
||||
# by creating a cache of Ccache needed binaries then using it for CI runs rather
|
||||
# than downloading every time.
|
||||
#
|
||||
# If it needs to be updated to another version, the process it to change
|
||||
# 'downloadpath' and 'version' inputs below then delete the existing cache
|
||||
# from Github interface so a new one is generated using new values.
|
||||
|
||||
name: getCcache
|
||||
description: "Windows: tries to get a cached version of Ccache and create one if fails"
|
||||
|
||||
inputs:
|
||||
ccachebindir:
|
||||
description: "Directory where ccache binaries shall be stored"
|
||||
required: true
|
||||
# Below inputs shall generally not be provided as they won't be used if a cached version exists
|
||||
# They are mainly used because Github do not support adding env variables in a composite action
|
||||
ccachedownloadpath:
|
||||
description: "Path where to download ccache"
|
||||
required: false
|
||||
default: https://github.com/ccache/ccache/releases/download/v4.7.4/
|
||||
ccacheversion:
|
||||
description: "Ccache version to be downloaded"
|
||||
required: false
|
||||
default: ccache-4.7.4-windows-x86_64
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Create destination directory
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p ${{ inputs.ccachebindir }}
|
||||
- name: Get cached version
|
||||
uses: actions/cache/restore@v3
|
||||
id: getCached
|
||||
with:
|
||||
path: ${{ inputs.ccachebindir }}
|
||||
key: ccacheforwin
|
||||
- name: Download ccache
|
||||
shell: bash
|
||||
if: steps.getCached.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
curl -L -o ccache.zip ${{ inputs.ccachedownloadpath }}${{ inputs.ccacheversion }}.zip
|
||||
7z x ccache.zip -o"ccachetemp" -r -y
|
||||
cp -a ccachetemp/${{ inputs.ccacheversion }}/ccache.exe ${{ inputs.ccachebindir }}
|
||||
cp -a ccachetemp/${{ inputs.ccacheversion }}/ccache.exe ${{ inputs.ccachebindir }}/cl.exe
|
||||
rm ccache.zip
|
||||
rm -rf ccachetemp
|
||||
- name: Save version to cache
|
||||
if: steps.getCached.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v3
|
||||
with:
|
||||
path: ${{ inputs.ccachebindir }}
|
||||
key: ${{ steps.getCached.outputs.cache-primary-key }}
|
||||
@@ -1,76 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD 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 *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This action aims at speeding up CI and reduce dependency to external resources
|
||||
# by creating a cache of Libpack needed files then using it for CI runs rather
|
||||
# than downloading every time.
|
||||
#
|
||||
# If it needs to be updated to another version, the process it to change
|
||||
# 'downloadpath' and 'version' inputs below then delete the existing cache
|
||||
# from Github interface so a new one is generated using new values.
|
||||
|
||||
name: getLibpack
|
||||
description: "Windows: tries to get a cached version of Libpack and create one if fails"
|
||||
|
||||
inputs:
|
||||
libpackdir:
|
||||
description: "Directory where libpack files shall be stored"
|
||||
required: true
|
||||
# Below inputs shall generally not be provided as they won't be used if a cached version exists
|
||||
# They are mainly used because Github do not support adding env variables in a composite action
|
||||
libpackdownloadurl:
|
||||
description: "URL where to download libpack"
|
||||
required: false
|
||||
default: https://github.com/FreeCAD/FreeCAD-LibPack/releases/download/2.8.2/LibPack-OCC76-V2-8.7z
|
||||
libpackname:
|
||||
description: "Libpack name (once downloaded)"
|
||||
required: false
|
||||
default: LibPack-OCC76-V2
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Create destination directory
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p ${{ inputs.libpackdir }}
|
||||
- name: Get cached version
|
||||
uses: actions/cache/restore@v3
|
||||
id: getCached
|
||||
with:
|
||||
path: ${{ inputs.libpackdir }}
|
||||
key: libpackforwin
|
||||
- name: Download libpack
|
||||
shell: bash
|
||||
if: steps.getCached.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
curl -L -o libpack.7z ${{ inputs.libpackdownloadurl }}
|
||||
7z x libpack.7z -o"libpacktemp" -r -y
|
||||
mv libpacktemp/${{ inputs.libpackname }}/* ${{ inputs.libpackdir }}
|
||||
rm -rf libpacktemp
|
||||
- name: Save version to cache
|
||||
if: steps.getCached.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v3
|
||||
with:
|
||||
path: ${{ inputs.libpackdir }}
|
||||
key: ${{ steps.getCached.outputs.cache-primary-key }}
|
||||
@@ -1,24 +0,0 @@
|
||||
# This workflow will triage pull requests and apply a label based on the
|
||||
# paths that are modified in the pull request.
|
||||
#
|
||||
# For more information, see:
|
||||
# https://github.com/actions/labeler
|
||||
|
||||
name: Labeler
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, reopened]
|
||||
|
||||
jobs:
|
||||
label:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- uses: actions/labeler@v3
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
configuration-path: ".github/labels.yml"
|
||||
sync-labels: false
|
||||
@@ -1,249 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD 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 *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is a build and test workflow for CI of FreeCAD.
|
||||
# This workflow aims at building and testing FreeCAD on Ubuntu 20.04 using GCC.
|
||||
|
||||
name: Build Ubuntu 20.04
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
artifactBasename:
|
||||
type: string
|
||||
required: true
|
||||
testOnBuildDir:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
allowedToFail:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
outputs:
|
||||
reportFile:
|
||||
value: ${{ jobs.Build.outputs.reportFile }}
|
||||
|
||||
jobs:
|
||||
|
||||
Build:
|
||||
runs-on: ubuntu-20.04
|
||||
continue-on-error: ${{ inputs.allowedToFail }}
|
||||
env:
|
||||
CCACHE_DIR: ${{ github.workspace }}/ccache
|
||||
CCACHE_CONFIGPATH: ${{ github.workspace }}/ccache/config
|
||||
CCACHE_MAXSIZE: 1G
|
||||
CCACHE_COMPILERCHECK: "%compiler% -dumpfullversion -dumpversion" # default:mtime
|
||||
CCACHE_COMPRESS: true
|
||||
CCACHE_COMPRESSLEVEL: 1
|
||||
CC: /usr/bin/gcc
|
||||
CXX: /usr/bin/g++
|
||||
#CC: /usr/bin/clang
|
||||
#CXX: /usr/bin/clang++
|
||||
builddir: ${{ github.workspace }}/build/
|
||||
logdir: /tmp/logs/
|
||||
reportdir: /tmp/report/
|
||||
reportfilename: ${{ inputs.artifactBasename }}-report.md
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
outputs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
|
||||
steps:
|
||||
- name: Checking out source code
|
||||
uses: actions/checkout@v3
|
||||
- name: Install FreeCAD dependencies
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
doxygen \
|
||||
graphviz \
|
||||
imagemagick \
|
||||
libboost-date-time-dev \
|
||||
libboost-dev \
|
||||
libboost-filesystem-dev \
|
||||
libboost-graph-dev \
|
||||
libboost-iostreams-dev \
|
||||
libboost-program-options-dev \
|
||||
libboost-python-dev \
|
||||
libboost-regex-dev \
|
||||
libboost-serialization-dev \
|
||||
libboost-thread-dev \
|
||||
libcoin-dev \
|
||||
libeigen3-dev \
|
||||
libgts-bin \
|
||||
libgts-dev \
|
||||
libkdtree++-dev \
|
||||
libmedc-dev \
|
||||
libocct-data-exchange-dev \
|
||||
libocct-ocaf-dev \
|
||||
libocct-visualization-dev \
|
||||
libopencv-dev \
|
||||
libproj-dev \
|
||||
libpyside2-dev \
|
||||
libqt5opengl5-dev \
|
||||
libqt5svg5-dev \
|
||||
libqt5x11extras5-dev \
|
||||
libqt5xmlpatterns5-dev \
|
||||
libshiboken2-dev \
|
||||
libspnav-dev \
|
||||
libvtk7-dev \
|
||||
libx11-dev \
|
||||
libxerces-c-dev \
|
||||
libzipios++-dev \
|
||||
netgen \
|
||||
netgen-headers \
|
||||
occt-draw \
|
||||
pyqt5-dev-tools \
|
||||
pyside2-tools \
|
||||
python3-dev \
|
||||
python3-git \
|
||||
python3-markdown \
|
||||
python3-matplotlib \
|
||||
python3-packaging \
|
||||
python3-pivy \
|
||||
python3-ply \
|
||||
python3-pyside2.qtcore \
|
||||
python3-pyside2.qtgui \
|
||||
python3-pyside2.qtnetwork \
|
||||
python3-pyside2.qtsvg \
|
||||
python3-pyside2.qtwebengine \
|
||||
python3-pyside2.qtwebenginecore \
|
||||
python3-pyside2.qtwebenginewidgets \
|
||||
python3-pyside2.qtwebchannel \
|
||||
python3-pyside2.qtwidgets \
|
||||
qtbase5-dev \
|
||||
qttools5-dev \
|
||||
qtwebengine5-dev \
|
||||
shiboken2 \
|
||||
swig \
|
||||
ccache \
|
||||
xvfb
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
mkdir -p ${{ env.CCACHE_DIR }}
|
||||
mkdir -p ${{ env.CCACHE_CONFIGPATH }}
|
||||
mkdir -p ${{ env.builddir }}
|
||||
mkdir -p ${{ env.logdir }}
|
||||
mkdir -p ${{ env.reportdir }}
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
- name: Generate cache key
|
||||
id: genCacheKey
|
||||
uses: ./.github/workflows/actions/linux/generateCacheKey
|
||||
with:
|
||||
compiler: ${{ env.CXX }}
|
||||
- name: Restore Compiler Cache
|
||||
uses: pat-s/always-upload-cache@v3
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-
|
||||
FC-${{ steps.genCacheKey.outputs.cacheKey }}-
|
||||
- name: Print CCache statistics before build, reset stats and print config
|
||||
run: |
|
||||
ccache -s
|
||||
ccache -z
|
||||
ccache -p
|
||||
- name: CMake Configure
|
||||
uses: ./.github/workflows/actions/linux/configure
|
||||
with:
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Cmake.log
|
||||
errorFile: ${{ env.logdir }}CmakeErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: CMake Build
|
||||
uses: ./.github/workflows/actions/linux/build
|
||||
with:
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Build.log
|
||||
errorFile: ${{ env.logdir }}BuildErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: Print ccache statistics after Build
|
||||
run: |
|
||||
ccache -s
|
||||
- name: FreeCAD CLI tests on build dir
|
||||
if: inputs.testOnBuildDir
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "CLI tests on build dir"
|
||||
testCommand: ${{ env.builddir }}bin/FreeCADCmd -t 0
|
||||
logFile: ${{ env.logdir }}TestCLIBuild.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: FreeCAD GUI tests on build dir
|
||||
if: inputs.testOnBuildDir
|
||||
timeout-minutes: 15
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "GUI tests on build dir"
|
||||
testCommand: xvfb-run ${{ env.builddir }}/bin/FreeCAD -t 0
|
||||
logFile: ${{ env.logdir }}TestGUIBuild.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: C++ tests
|
||||
timeout-minutes: 1
|
||||
uses: ./.github/workflows/actions/runCPPTests/runAllTests
|
||||
with:
|
||||
reportdir: ${{ env.reportdir }}
|
||||
builddir: ${{ env.builddir }}
|
||||
reportFile: ${{ env.reportdir }}${{ env.reportfilename }}
|
||||
- name: CMake Install
|
||||
uses: ./.github/workflows/actions/linux/install
|
||||
with:
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Install.log
|
||||
errorFile: ${{ env.logdir }}InstallErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: FreeCAD CLI tests on install
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "CLI tests on install"
|
||||
testCommand: FreeCADCmd -t 0
|
||||
logFile: ${{ env.logdir }}TestCLIInstall.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: FreeCAD GUI tests on install
|
||||
timeout-minutes: 15
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "GUI tests on install"
|
||||
testCommand: xvfb-run FreeCAD -t 0
|
||||
logFile: ${{ env.logdir }}TestGUIInstall.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
/var/crash/*FreeCAD*
|
||||
- name: Upload report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ env.reportfilename }}
|
||||
path: |
|
||||
${{env.reportdir}}${{ env.reportfilename }}
|
||||
@@ -1,247 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD 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 *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is a build and test workflow for CI of FreeCAD.
|
||||
# This workflow aims at building and testing FreeCAD on Ubuntu 22.04 using Clang.
|
||||
|
||||
name: Build Ubuntu 22.04
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
artifactBasename:
|
||||
type: string
|
||||
required: true
|
||||
testOnBuildDir:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
allowedToFail:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
outputs:
|
||||
reportFile:
|
||||
value: ${{ jobs.Build.outputs.reportFile }}
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
runs-on: ubuntu-22.04
|
||||
continue-on-error: ${{ inputs.allowedToFail }}
|
||||
env:
|
||||
CCACHE_DIR: ${{ github.workspace }}/ccache
|
||||
CCACHE_CONFIGPATH: ${{ github.workspace }}/ccache/config
|
||||
CCACHE_MAXSIZE: 1G
|
||||
CCACHE_COMPILERCHECK: "%compiler% -dumpfullversion -dumpversion" # default:mtime
|
||||
CCACHE_COMPRESS: true
|
||||
CCACHE_COMPRESSLEVEL: 1
|
||||
#CC: /usr/bin/gcc
|
||||
#CXX: /usr/bin/g++
|
||||
CC: /usr/bin/clang
|
||||
CXX: /usr/bin/clang++
|
||||
builddir: ${{ github.workspace }}/build/
|
||||
logdir: /tmp/logs/
|
||||
reportdir: /tmp/report/
|
||||
reportfilename: ${{ inputs.artifactBasename }}-report.md
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
outputs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
|
||||
steps:
|
||||
- name: Checking out source code
|
||||
uses: actions/checkout@v3
|
||||
- name: Install FreeCAD dependencies
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
doxygen \
|
||||
graphviz \
|
||||
imagemagick \
|
||||
libboost-date-time-dev \
|
||||
libboost-dev \
|
||||
libboost-filesystem-dev \
|
||||
libboost-graph-dev \
|
||||
libboost-iostreams-dev \
|
||||
libboost-program-options-dev \
|
||||
libboost-python-dev \
|
||||
libboost-regex-dev \
|
||||
libboost-serialization-dev \
|
||||
libboost-thread-dev \
|
||||
libcoin-dev \
|
||||
libeigen3-dev \
|
||||
libgts-bin \
|
||||
libgts-dev \
|
||||
libkdtree++-dev \
|
||||
libmedc-dev \
|
||||
libocct-data-exchange-dev \
|
||||
libocct-ocaf-dev \
|
||||
libocct-visualization-dev \
|
||||
libopencv-dev \
|
||||
libproj-dev \
|
||||
libpyside2-dev \
|
||||
libqt5opengl5-dev \
|
||||
libqt5svg5-dev \
|
||||
libqt5x11extras5-dev \
|
||||
libqt5xmlpatterns5-dev \
|
||||
libshiboken2-dev \
|
||||
libspnav-dev \
|
||||
libvtk7-dev \
|
||||
libx11-dev \
|
||||
libxerces-c-dev \
|
||||
libzipios++-dev \
|
||||
netgen \
|
||||
netgen-headers \
|
||||
occt-draw \
|
||||
pyqt5-dev-tools \
|
||||
pyside2-tools \
|
||||
python3-dev \
|
||||
python3-git \
|
||||
python3-markdown \
|
||||
python3-matplotlib \
|
||||
python3-packaging \
|
||||
python3-pivy \
|
||||
python3-ply \
|
||||
python3-pyside2.qtcore \
|
||||
python3-pyside2.qtgui \
|
||||
python3-pyside2.qtnetwork \
|
||||
python3-pyside2.qtsvg \
|
||||
python3-pyside2.qtwebengine \
|
||||
python3-pyside2.qtwebenginecore \
|
||||
python3-pyside2.qtwebenginewidgets \
|
||||
python3-pyside2.qtwebchannel \
|
||||
python3-pyside2.qtwidgets \
|
||||
qtbase5-dev \
|
||||
qttools5-dev \
|
||||
qtwebengine5-dev \
|
||||
shiboken2 \
|
||||
swig \
|
||||
ccache \
|
||||
xvfb
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
mkdir -p ${{ env.CCACHE_DIR }}
|
||||
mkdir -p ${{ env.CCACHE_CONFIGPATH }}
|
||||
mkdir -p ${{ env.builddir }}
|
||||
mkdir -p ${{ env.logdir }}
|
||||
mkdir -p ${{ env.reportdir }}
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
- name: Generate cache key
|
||||
id: genCacheKey
|
||||
uses: ./.github/workflows/actions/linux/generateCacheKey
|
||||
with:
|
||||
compiler: ${{ env.CXX }}
|
||||
- name: Restore Compiler Cache
|
||||
uses: pat-s/always-upload-cache@v3
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-
|
||||
FC-${{ steps.genCacheKey.outputs.cacheKey }}-
|
||||
- name: Print CCache statistics before build, reset stats and print config
|
||||
run: |
|
||||
ccache -s
|
||||
ccache -z
|
||||
ccache -p
|
||||
- name: CMake Configure
|
||||
uses: ./.github/workflows/actions/linux/configure
|
||||
with:
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Cmake.log
|
||||
errorFile: ${{ env.logdir }}CmakeErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: CMake Build
|
||||
uses: ./.github/workflows/actions/linux/build
|
||||
with:
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Build.log
|
||||
errorFile: ${{ env.logdir }}BuildErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: Print ccache statistics after Build
|
||||
run: |
|
||||
ccache -s
|
||||
- name: FreeCAD CLI tests on build dir
|
||||
if: inputs.testOnBuildDir
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "CLI tests on build dir"
|
||||
testCommand: ${{ env.builddir }}bin/FreeCADCmd -t 0
|
||||
logFile: ${{ env.logdir }}TestCLIBuild.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: FreeCAD GUI tests on build dir
|
||||
if: inputs.testOnBuildDir
|
||||
timeout-minutes: 15
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "GUI tests on build dir"
|
||||
testCommand: xvfb-run ${{ env.builddir }}/bin/FreeCAD -t 0
|
||||
logFile: ${{ env.logdir }}TestGUIBuild.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: C++ tests
|
||||
timeout-minutes: 1
|
||||
uses: ./.github/workflows/actions/runCPPTests/runAllTests
|
||||
with:
|
||||
reportdir: ${{ env.reportdir }}
|
||||
builddir: ${{ env.builddir }}
|
||||
reportFile: ${{ env.reportdir }}${{ env.reportfilename }}
|
||||
- name: CMake Install
|
||||
uses: ./.github/workflows/actions/linux/install
|
||||
with:
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Install.log
|
||||
errorFile: ${{ env.logdir }}InstallErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: FreeCAD CLI tests on install
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "CLI tests on install"
|
||||
testCommand: FreeCADCmd -t 0
|
||||
logFile: ${{ env.logdir }}TestCLIInstall.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: FreeCAD GUI tests on install
|
||||
timeout-minutes: 15
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "GUI tests on install"
|
||||
testCommand: xvfb-run FreeCAD -t 0
|
||||
logFile: ${{ env.logdir }}TestGUIInstall.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
/var/crash/*FreeCAD*
|
||||
- name: Upload report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ env.reportfilename }}
|
||||
path: |
|
||||
${{env.reportdir}}${{ env.reportfilename }}
|
||||
@@ -1,146 +0,0 @@
|
||||
# ***************************************************************************
|
||||
# * Copyright (c) 2023 0penBrain *
|
||||
# * *
|
||||
# * This program is free software; you can redistribute it and/or modify *
|
||||
# * it under the terms of the GNU Lesser General Public License (LGPL) *
|
||||
# * as published by the Free Software Foundation; either version 2 of *
|
||||
# * the License, or (at your option) any later version. *
|
||||
# * for detail see the LICENCE text file. *
|
||||
# * *
|
||||
# * 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 Library General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Library General Public *
|
||||
# * License along with this program; if not, write to the Free Software *
|
||||
# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
|
||||
# * USA *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is a build and test workflow for CI of FreeCAD.
|
||||
# This workflow aims at building and testing FreeCAD on Windows using MSVC.
|
||||
|
||||
name: Build Windows
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
artifactBasename:
|
||||
type: string
|
||||
required: true
|
||||
allowedToFail:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
outputs:
|
||||
reportFile:
|
||||
value: ${{ jobs.Build.outputs.reportFile }}
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
runs-on: windows-latest
|
||||
continue-on-error: ${{ inputs.allowedToFail }}
|
||||
env:
|
||||
CCACHE_DIR: C:/FC/cache/
|
||||
CCACHE_COMPILERCHECK: "%compiler%" # default:mtime
|
||||
CCACHE_MAXSIZE: 1G
|
||||
CCACHE_COMPRESS: true
|
||||
CCACHE_COMPRESSLEVEL: 1
|
||||
CCACHE_NOHASHDIR: true
|
||||
CCACHE_DIRECT: true
|
||||
#CCACHE_SLOPPINESS: "pch_defines,time_macros" # Can't get PCH to work on Windows
|
||||
CCACHE_LOGFILE: C:/logs/ccache.log
|
||||
## Have to use C:\ because not enough space on workspace drive
|
||||
builddir: C:/FC/build/
|
||||
libpackdir: C:/FC/libpack/
|
||||
ccachebindir: C:/FC/ccache/
|
||||
logdir: C:/logs/
|
||||
reportdir: C:/report/
|
||||
reportfilename: ${{ inputs.artifactBasename }}-report.md
|
||||
outputs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
|
||||
steps:
|
||||
- name: Checking out source code
|
||||
uses: actions/checkout@v3
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
mkdir ${{ env.CCACHE_DIR }}
|
||||
mkdir ${{ env.ccachebindir }}
|
||||
mkdir ${{ env.libpackdir }}
|
||||
mkdir ${{ env.builddir }}
|
||||
mkdir ${{ env.logdir }}
|
||||
mkdir ${{ env.reportdir }}
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
- name: Get Ccache
|
||||
uses: ./.github/workflows/actions/windows/getCcache
|
||||
with:
|
||||
ccachebindir: ${{ env.ccachebindir }}
|
||||
- name: Get Libpack
|
||||
uses: ./.github/workflows/actions/windows/getLibpack
|
||||
with:
|
||||
libpackdir: ${{ env.libpackdir }}
|
||||
- name: Restore compiler cache
|
||||
uses: pat-s/always-upload-cache@v3
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-Windows-${{ github.ref }}-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
FC-Windows-${{ github.ref }}-
|
||||
FC-Windows-
|
||||
- name: Print Ccache statistics before build, reset stats and print config
|
||||
run: |
|
||||
. $env:ccachebindir\ccache -s
|
||||
. $env:ccachebindir\ccache -z
|
||||
. $env:ccachebindir\ccache -p
|
||||
- name: Append Libpack bin directory to Path
|
||||
if: false # Disabled because not enough to set FREECAD_COPY_LIBPACK_BIN_TO_BUILD=OFF
|
||||
run: |
|
||||
echo "${{ env.libpackdir }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
- name: Configuring CMake
|
||||
run: >
|
||||
cmake -B"${{ env.builddir }}" .
|
||||
-DCMAKE_VS_NO_COMPILE_BATCHING=ON
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DFREECAD_USE_PCH=OFF
|
||||
-DFREECAD_RELEASE_PDB=OFF
|
||||
-DFREECAD_LIBPACK_DIR="${{ env.libpackdir }}"
|
||||
-DPYTHON_DEBUG_LIBRARY="${{ env.libpackdir }}bin/libs/python38_d.lib"
|
||||
-DPYTHON_EXECUTABLE="${{ env.libpackdir }}bin/python.exe"
|
||||
-DPYTHON_INCLUDE_DIR="${{ env.libpackdir }}bin/include"
|
||||
-DPYTHON_LIBRARY="${{ env.libpackdir }}bin/libs/python38.lib"
|
||||
-DXercesC_INCLUDE_DIR="${{ env.libpackdir }}include"
|
||||
-DXercesC_LIBRARY_RELEASE="${{ env.libpackdir }}lib/xerces-c_3.lib"
|
||||
-DXercesC_LIBRARY_DEBUG="${{ env.libpackdir }}lib/xerces-c_3D.lib"
|
||||
-DFREECAD_COPY_DEPEND_DIRS_TO_BUILD=ON
|
||||
-DFREECAD_COPY_LIBPACK_BIN_TO_BUILD=OFF
|
||||
-DFREECAD_COPY_PLUGINS_BIN_TO_BUILD=ON
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v1.3
|
||||
- name: Compiling sources
|
||||
run: |
|
||||
cd $env:builddir
|
||||
msbuild ALL_BUILD.vcxproj /m /p:Configuration=Release /p:TrackFileAccess=false /p:CLToolPath=${{ env.ccachebindir }}
|
||||
- name: Print Ccache statistics after build
|
||||
run: |
|
||||
. $env:ccachebindir\ccache -s
|
||||
- name: Move libpack bin folder to build folder # Shorter in time than copying with CMake FREECAD_COPY_LIBPACK_BIN_TO_BUILD
|
||||
run: |
|
||||
Move-Item -Force -Path ${{ env.libpackdir }}bin -Destination ${{ env.builddir }}
|
||||
- name: C++ unit tests
|
||||
if: false # Disabled because seems to not exist on Windows build
|
||||
timeout-minutes: 1
|
||||
run: |
|
||||
. ${{ env.builddir }}\test\Tests_run --gtest_output=json:${{ env.reportdir }}gtest_results.json # 2>&1 | tee -filepath ${{ env.logdir }}\unitTests.log
|
||||
- name: FreeCAD CLI tests
|
||||
run: |
|
||||
. ${{ env.builddir }}\bin\FreeCADCmd -t 0 # 2>&1 | tee -filepath ${{ env.logdir }}\integrationTests.log
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
@@ -1,773 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD 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 *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is the lint workflow for CI of FreeCAD
|
||||
|
||||
name: Lint
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
artifactBasename:
|
||||
type: string
|
||||
required: true
|
||||
changedFiles:
|
||||
type: string
|
||||
required: true
|
||||
changedCppFiles:
|
||||
type: string
|
||||
required: true
|
||||
changedPythonFiles:
|
||||
type: string
|
||||
required: true
|
||||
checkLineendings:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
lineendingsFailSilent:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
checkWhitespace:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
whitespaceFailSilent:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
checkTabs:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
tabsFailSilent:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
checkQtConnections:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
qtConnectionsFailSilent:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
checkCpplint:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
cpplintFilters:
|
||||
default: -build/c++11,-build/header_guard,-build/include,-build/include_alpha,-build/include_order,-build/include_subdir,-build/include_what_you_use,-build/namespaces,-legal/copyright,-readability/braces,-readability-braces-around-statements,-readability/casting,-readability/namespace,-readability/todo,-runtime/indentation_namespace,-runtime/int,-runtime/references,-whitespace/blank_line,-whitespace/braces,-whitespace/comma,-whitespace/comments,-whitespace/end_of_line,-whitespace/indent,-whitespace/line_length,-whitespace/newline,-whitespace/operators,-whitespace/parens,-whitespace/semicolon,-whitespace/tab,-whitespace/todo
|
||||
type: string
|
||||
required: false
|
||||
cpplintLineLength:
|
||||
default: 120
|
||||
type: string
|
||||
required: false
|
||||
cpplintFailSilent:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
checkPylint:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
pylintDisable:
|
||||
default: C0302,C0303 # Trailing whitespaces (C0303) are already checked
|
||||
type: string
|
||||
required: false
|
||||
pylintFailSilent:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
checkBlack:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
blackFailSilent:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
checkClangFormat:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
clangStyle:
|
||||
default: file # for .clang-format file
|
||||
type: string
|
||||
required: false
|
||||
clangFormatFailSilent:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
checkSpelling:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
listIgnoredMisspelling:
|
||||
default: .github/codespellignore
|
||||
type: string
|
||||
required: false
|
||||
spellingIgnore:
|
||||
default: ./.git,*.po,*.ts,*.svg,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml,./build/
|
||||
type: string
|
||||
required: false
|
||||
codespellFailSilent:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
checkClangTidy:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
clangTidyChecks:
|
||||
default: # empty to use the .clang-tidy file
|
||||
type: string
|
||||
required: false
|
||||
clangTidyFailSilent:
|
||||
default: true # warnings or notes will never fail the CI, only errors
|
||||
type: boolean
|
||||
required: false
|
||||
checkClazy: # for the Message codes see: https://invent.kde.org/sdk/clazy#list-of-checks
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
clazyChecks:
|
||||
default: level1
|
||||
type: string
|
||||
required: false
|
||||
clazyFailSilent:
|
||||
default: true # warnings or notes will never fail the CI, only errors
|
||||
type: boolean
|
||||
required: false
|
||||
checkClazyQT6:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
clazyQT6Checks:
|
||||
default: qt6-deprecated-api-fixes,qt6-header-fixes,qt6-qhash-signature,qt6-fwd-fixes,missing-qobject-macro # for QT6 Porting https://invent.kde.org/sdk/clazy#list-of-checks
|
||||
type: string
|
||||
required: false
|
||||
QT6Branch: # branch to check for QT6 Porting
|
||||
default: master
|
||||
type: string
|
||||
required: false
|
||||
clazyQT6FailSilent:
|
||||
default: true # warnings or notes will never fail the CI, only errors
|
||||
type: boolean
|
||||
required: false
|
||||
outputs:
|
||||
reportFile:
|
||||
value: ${{ jobs.Lint.outputs.reportFile }}
|
||||
|
||||
jobs:
|
||||
|
||||
Lint:
|
||||
if: inputs.changedFiles != ''
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
logdir: /tmp/logs/
|
||||
fixesdir: /tmp/fixes/
|
||||
reportdir: /tmp/report/
|
||||
reportfilename: ${{ inputs.artifactBasename }}-report.md
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
outputs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
mkdir -p ${{ env.logdir }}
|
||||
mkdir -p ${{ env.fixesdir }}
|
||||
mkdir -p ${{ env.reportdir }}
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
# Run generic lints
|
||||
- name: Check for non Unix line ending
|
||||
if: inputs.checkLineendings && always()
|
||||
continue-on-error: ${{ inputs.lineendingsFailSilent }}
|
||||
run: |
|
||||
lineendings=0
|
||||
for file in ${{ inputs.changedFiles }}
|
||||
do
|
||||
# Check for DOS or MAC line endings
|
||||
if [[ $(file -b $file) =~ "with CR" ]]
|
||||
then
|
||||
echo "::warning file=$file,title=$file::File has non Unix line endings"
|
||||
echo "$file has non Unix line endings" >> ${{ env.logdir }}lineendings.log
|
||||
((lineendings=lineendings+1))
|
||||
fi
|
||||
done
|
||||
echo "Found $lineendings line ending errors"
|
||||
# Write the report
|
||||
if [ $lineendings -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:information_source: Found $lineendings problems with line endings</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}lineendings.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo ":heavy_check_mark: No line ending problem found " >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $lineendings -eq 0 ]
|
||||
- name: Check for trailing whitespaces
|
||||
if: inputs.checkWhitespace && always()
|
||||
continue-on-error: ${{ inputs.whitespaceFailSilent }}
|
||||
run: |
|
||||
whitespaceErrors=0
|
||||
exclude="*[.md]"
|
||||
for file in ${{ inputs.changedFiles }}
|
||||
do
|
||||
# Check for trailing whitespaces
|
||||
grep -nIHE --exclude="$exclude" " $" $file | sed -e "s/$/<-- trailing whitespace/" >> ${{ env.logdir }}whitespace.log || true
|
||||
done
|
||||
# Write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}whitespace.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/grepMatcherWarning.json"
|
||||
cat ${{ env.logdir }}whitespace.log
|
||||
echo "::remove-matcher owner=grepMatcher-warning::"
|
||||
whitespaceErrors=$(wc -l < ${{ env.logdir }}whitespace.log)
|
||||
fi
|
||||
echo "Found $whitespaceErrors whitespace errors"
|
||||
# Write the report
|
||||
if [ $whitespaceErrors -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:information_source: Found $whitespaceErrors trailing whitespace</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}whitespace.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo ":heavy_check_mark: No trailing whitespace found " >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $whitespaceErrors -eq 0 ]
|
||||
- name: Check for Tab usage
|
||||
if: inputs.checkTabs && always()
|
||||
continue-on-error: ${{ inputs.tabsFailSilent }}
|
||||
run: |
|
||||
tabErrors=0
|
||||
exclude="*[.md]"
|
||||
# Check for Tab usage
|
||||
for file in ${{ steps.changed-files.outputs.all_changed_files }}
|
||||
do
|
||||
grep -nIHE --exclude="$exclude" $'\t' $file | sed -e "s/$/ <-- contains tab/" >> ${{ env.logdir }}tab.log || true
|
||||
done
|
||||
# Write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}tab.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/grepMatcherWarning.json"
|
||||
cat ${{ env.logdir }}tab.log
|
||||
echo "::remove-matcher owner=grepMatcher-warning::"
|
||||
tabErrors=$(wc -l < ${{ env.logdir }}tab.log)
|
||||
fi
|
||||
echo "Found $tabErrors tab errors"
|
||||
# Write the report
|
||||
if [ $tabErrors -gt 0 ]; then
|
||||
echo "<details><summary>:information_source: Found $tabErrors tabs, better to use spaces</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}tab.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo ":heavy_check_mark: No tabs found" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $tabErrors -eq 0 ]
|
||||
# Run Python lints
|
||||
- name: Pylint
|
||||
if: inputs.checkPylint && inputs.changedPythonFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.pylintFailSilent }}
|
||||
run: |
|
||||
pylintErrors=0
|
||||
pylintWarnings=0
|
||||
pylintRefactorings=0
|
||||
pylintConventions=0
|
||||
pip install pylint
|
||||
# List enabled pylint checks
|
||||
pylint --list-msgs-enabled > ${{ env.logdir }}pylint-enabled-checks.log
|
||||
# Run pylint on all python files
|
||||
set +e
|
||||
pylint --disable=${{ inputs.pylintDisable }} ${{ inputs.changedPythonFiles }} > ${{ env.logdir }}pylint.log
|
||||
exitCode=$?
|
||||
set -e
|
||||
# If pylint has run successfully, write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}pylint.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/pylintError.json"
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/pylintWarning.json"
|
||||
cat ${{ env.logdir }}pylint.log
|
||||
echo "::remove-matcher owner=pylint-error::"
|
||||
echo "::remove-matcher owner=pylint-warning::"
|
||||
pylintErrors=$( grep -oP '(?<=error \|)\d+' ${{ env.logdir }}pylint.log) || true # grep returns 0 if no match is found
|
||||
pylintWarnings=$( grep -oP '(?<=warning \|)\d+' ${{ env.logdir }}pylint.log) || true
|
||||
pylintRefactorings=$( grep -oP '(?<=refactor \|)\d+' ${{ env.logdir }}pylint.log) || true
|
||||
pylintConventions=$( grep -oP '(?<=convention \|)\d+' ${{ env.logdir }}pylint.log) || true
|
||||
fi
|
||||
echo "Found $pylintErrors errors, $pylintWarnings warnings, $pylintRefactorings refactorings, $pylintConventions conventions"
|
||||
# Write the report
|
||||
if [ $pylintErrors -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:fire: Pylint found :fire: $pylintErrors errors, :warning: $pylintWarnings warnings, :construction: $pylintRefactorings refactorings and :pencil2: $pylintConventions conventions</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ $pylintWarnings -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:warning: Pylint found :warning: $pylintWarnings warnings, :construction: $pylintRefactorings refactorings and :pencil2: $pylintConventions conventions</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ $pylintRefactorings -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:construction: Pylint found :construction: $pylintRefactorings refactorings and :pencil2: $pylintConventions conventions</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ $pylintConventions -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:pencil2: Pylint found :pencil2: $pylintConventions conventions</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: No pylint errors found </summary> " >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# List enabled checks in the report
|
||||
echo "<details><summary>:information_source: Enabled checks</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}pylint-enabled-checks.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}pylint.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $pylintErrors -eq 0 ]
|
||||
- name: Black (Python)
|
||||
if: inputs.checkBlack && inputs.changedPythonFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.blackFailSilent }}
|
||||
run: |
|
||||
blackReformats=0
|
||||
blackFails=0
|
||||
pip install black
|
||||
set +e
|
||||
black --check ${{ inputs.changedPythonFiles }} &> ${{ env.logdir }}black.log
|
||||
exitCode=$?
|
||||
set -e
|
||||
# If black has run successfully, write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}black.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/blackWarning.json"
|
||||
cat ${{ env.logdir }}black.log
|
||||
echo "::remove-matcher owner=black-warning::"
|
||||
blackReformats=$( grep -oP '\d+(?= fil.+ would be reformatted)' ${{ env.logdir }}black.log) || true # grep returns 0 if no match is found
|
||||
blackFails=$( grep -oP '\d+(?= fil.+ would fail to reformat)' ${{ env.logdir }}black.log) || true
|
||||
fi
|
||||
echo "Found $blackReformats files would be reformatted and $blackFails files would fail to reformat"
|
||||
# Write the report
|
||||
if [ $blackReformats -gt 0 ] || [ $blackFails -gt 0 ] #FIXME purpose of testing $blackFails as we don't use it then
|
||||
then
|
||||
echo "<details><summary>:pencil2: Black would reformat $blackReformats files</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: Black would reformat no file</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}black.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $exitCode -eq 0 ]
|
||||
# Run C++ lints
|
||||
- name: Install FreeCAD dependencies
|
||||
if: inputs.changedCppFiles != '' && always()
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
doxygen \
|
||||
graphviz \
|
||||
imagemagick \
|
||||
libboost-date-time-dev \
|
||||
libboost-dev \
|
||||
libboost-filesystem-dev \
|
||||
libboost-graph-dev \
|
||||
libboost-iostreams-dev \
|
||||
libboost-program-options-dev \
|
||||
libboost-python-dev \
|
||||
libboost-regex-dev \
|
||||
libboost-serialization-dev \
|
||||
libboost-thread-dev \
|
||||
libcoin-dev \
|
||||
libeigen3-dev \
|
||||
libgts-bin \
|
||||
libgts-dev \
|
||||
libkdtree++-dev \
|
||||
libmedc-dev \
|
||||
libocct-data-exchange-dev \
|
||||
libocct-ocaf-dev \
|
||||
libocct-visualization-dev \
|
||||
libopencv-dev \
|
||||
libproj-dev \
|
||||
libpyside2-dev \
|
||||
libqt5opengl5-dev \
|
||||
libqt5svg5-dev \
|
||||
libqt5x11extras5-dev \
|
||||
libqt5xmlpatterns5-dev \
|
||||
libshiboken2-dev \
|
||||
libspnav-dev \
|
||||
libvtk7-dev \
|
||||
libx11-dev \
|
||||
libxerces-c-dev \
|
||||
libzipios++-dev \
|
||||
netgen \
|
||||
netgen-headers \
|
||||
occt-draw \
|
||||
pyqt5-dev-tools \
|
||||
pyside2-tools \
|
||||
python3-dev \
|
||||
python3-git \
|
||||
python3-markdown \
|
||||
python3-matplotlib \
|
||||
python3-packaging \
|
||||
python3-pivy \
|
||||
python3-ply \
|
||||
python3-pyside2.qtcore \
|
||||
python3-pyside2.qtgui \
|
||||
python3-pyside2.qtnetwork \
|
||||
python3-pyside2.qtsvg \
|
||||
python3-pyside2.qtwebengine \
|
||||
python3-pyside2.qtwebenginecore \
|
||||
python3-pyside2.qtwebenginewidgets \
|
||||
python3-pyside2.qtwebchannel \
|
||||
python3-pyside2.qtwidgets \
|
||||
qtbase5-dev \
|
||||
qttools5-dev \
|
||||
qtwebengine5-dev \
|
||||
shiboken2 \
|
||||
swig \
|
||||
ccache \
|
||||
xvfb
|
||||
- name: Run CMake # This is needed for Clang tools to work correctly
|
||||
if: inputs.changedCppFiles != '' && always()
|
||||
run: |
|
||||
mkdir build && cmake -S ./ -B ./build/ -D CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE
|
||||
- name: Check old Qt string-based connections (https://wiki.qt.io/New_Signal_Slot_Syntax)
|
||||
if: inputs.checkQtConnections && inputs.changedCppFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.qtConnectionsFailSilent }}
|
||||
run: |
|
||||
qtconnectionSyntax=0
|
||||
exclude="*[.md,.log,.ts,.git]"
|
||||
# Check all files for QT string-based connections
|
||||
for file in ${{ inputs.changedFiles }} #TODO does this makes sense in Python files ?
|
||||
do
|
||||
grep -nIHE --exclude="$exclude" $' SIGNAL| SLOT' $file | sed -e "s/$/ <--Consider using Functor-Based Connections/" >> ${{ env.logdir }}qtConnections.log || true #TODO seems to trigger false positives
|
||||
done
|
||||
# Write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}qtConnections.log ]; then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/grepMatcherWarning.json"
|
||||
cat ${{ env.logdir }}qtConnections.log
|
||||
echo "::remove-matcher owner=grepMatcher-warning::"
|
||||
qtconnectionSyntax=$(wc -l < ${{ env.logdir }}qtConnections.log)
|
||||
fi
|
||||
echo "Found $qtconnectionSyntax QT string-based connections"
|
||||
# Write the report
|
||||
if [ $qtconnectionSyntax -gt 0 ]; then
|
||||
echo "<details><summary>:information_source: Found $qtconnectionSyntax QT string-based connections :arrow_right: consider using QT functor-Based Connections</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# documentation link
|
||||
echo "For more information see: https://wiki.qt.io/New_Signal_Slot_Syntax or https://github.com/FreeCAD/FreeCAD/issues/6166" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}qtConnections.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo ":heavy_check_mark: No string-based connections found " >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $qtconnectionSyntax -eq 0 ]
|
||||
- name: Cpplint
|
||||
if: inputs.checkCpplint && inputs.changedCppFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.cpplintFailSilent }}
|
||||
run: |
|
||||
cpplintErrors=0
|
||||
pip install cpplint
|
||||
# Run cpplint
|
||||
for file in ${{ inputs.changedCppFiles }}
|
||||
do
|
||||
cpplint --filter=${{ inputs.cpplintFilters }} --linelength=${{ inputs.cpplintLineLength }} $file &>> ${{ env.logdir }}cpplint.log || true
|
||||
done
|
||||
# If cpplint has run successfully, write the Log to the console with the Problem Matchers
|
||||
if [ ${{ env.logdir }}cpplint.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/cpplint.json"
|
||||
cat ${{ env.logdir }}cpplint.log
|
||||
echo "::remove-matcher owner=cpplint::"
|
||||
cpplintErrors=$(grep -nIHE "\[[0-9]\]$" ${{ env.logdir }}cpplint.log | wc -l ) || true
|
||||
fi
|
||||
echo "Found $cpplintErrors cpplint errors"
|
||||
# Write the report
|
||||
if [ $cpplintErrors -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:warning: CppLint found $cpplintErrors errors / warnings</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: No cpplint errors found </summary> " >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}cpplint.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $cpplintErrors -eq 0 ]
|
||||
- name: Clang-format
|
||||
if: inputs.checkClangFormat && inputs.changedCppFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.clangFormatFailSilent }}
|
||||
run: |
|
||||
clangFormatErrors=0
|
||||
# Run clang-format on all cpp files
|
||||
clang-format --dry-run --ferror-limit=1 --verbose --style=${{ inputs.clangStyle }} ${{ inputs.changedCppFiles }} &>> ${{ env.logdir }}clang-format.log || true
|
||||
# If clang-format has run successfully, write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}clang-format.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/clang.json"
|
||||
cat ${{ env.logdir }}clang-format.log
|
||||
echo "::remove-matcher owner=clang::"
|
||||
clangFormatErrors=$(grep -nIHE "\[-Wclang-format-violations]$" ${{ env.logdir }}clang-format.log | wc -l ) || true
|
||||
fi
|
||||
echo "Found $clangFormatErrors clang-format errors"
|
||||
# Write the report
|
||||
if [ $clangFormatErrors -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:pencil2: Clang-format would reformat $clangFormatErrors files</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: Clang-format would reformat no file</summary> " >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}clang-format.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $clangFormatErrors -eq 0 ]
|
||||
- name: Codespell
|
||||
if: inputs.checkSpelling && always()
|
||||
continue-on-error: ${{ inputs.codespellFailSilent }}
|
||||
run: |
|
||||
pip install codespell
|
||||
wget https://raw.githubusercontent.com/codespell-project/codespell/master/codespell_lib/data/dictionary.txt
|
||||
#wget https://raw.githubusercontent.com/codespell-project/codespell/master/codespell_lib/data/dictionary_rare.txt
|
||||
set +e
|
||||
misspellings=$( { codespell --quiet-level 3 --summary --count --ignore-words ${{ inputs.listIgnoredMisspelling }} --skip ${{ inputs.spellingIgnore }} -D dictionary.txt ${{ inputs.changedFiles }} > ${{ env.logdir }}codespell.log ; } 2>&1 )
|
||||
set -e
|
||||
# If codespell has run successfully, write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}codespell.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/codespell.json"
|
||||
cat ${{ env.logdir }}codespell.log
|
||||
echo "::remove-matcher owner=codespell::"
|
||||
fi
|
||||
echo "Found $misspellings misspellings"
|
||||
# Write the report
|
||||
if [ $misspellings -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:pencil2: Codespell found $misspellings misspellings</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: Codespell found no misspellings</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "To ignore false positives, append the word to the [.github/codespellignore](https://github.com/FreeCAD/FreeCAD/blob/master/.github/codespellignore) file (lowercase)" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}codespell.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $misspellings -eq 0 ]
|
||||
- name: Clang-tidy
|
||||
if: inputs.checkClangTidy && inputs.changedCppFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.clangTidyFailSilent }}
|
||||
run: |
|
||||
clangTidyErrors=0
|
||||
clangTidyWarnings=0
|
||||
clangTidyNotes=0
|
||||
sudo apt-get install -y --no-install-recommends clang-tidy
|
||||
#TODO: check where this "clang-tidy.yaml" goes ; shall this be put in the fixes ?
|
||||
clang-tidy --quiet --format-style=${{ inputs.clangStyle }} --export-fixes=clang-tidy.yaml -checks=${{ inputs.clangTidyChecks }} -p build/ --explain-config &>> ${{ env.logdir }}clang-tidy-enabled-checks.log
|
||||
# Run clang-tidy on all cpp files
|
||||
set +e
|
||||
clang-tidy --quiet --format-style=${{ inputs.clangStyle }} --export-fixes=clang-tidy.yaml -checks=${{ inputs.clangTidyChecks }} -p build/ ${{ inputs.changedCppFiles }} &>> ${{ env.logdir }}clang-tidy.log
|
||||
exitCode=$?
|
||||
set -e
|
||||
# If clang-tidy has run successfully, write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}clang-tidy.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/clang.json"
|
||||
cat ${{ env.logdir }}clang-tidy.log
|
||||
echo "::remove-matcher owner=clang::"
|
||||
clangTidyErrors=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): error: .+$" ${{ env.logdir }}clang-tidy.log | wc -l ) || true
|
||||
clangTidyWarnings=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): warning: .+$" ${{ env.logdir }}clang-tidy.log | wc -l ) || true
|
||||
clangTidyNotes=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): note: .+$" ${{ env.logdir }}clang-tidy.log | wc -l ) || true
|
||||
fi
|
||||
echo "Found $clangTidyErrors errors, $clangTidyWarnings warnings, $clangTidyNotes notes"
|
||||
# Write the report
|
||||
if [ $clangTidyErrors -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:fire: Clang-Tidy found :fire: $clangTidyErrors errors, :warning: $clangTidyWarnings warnings and :pencil2: $clangTidyNotes notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ $clangTidyWarnings -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:warning: Clang-Tidy found :warning: $clangTidyWarnings warnings and :pencil2: $clangTidyNotes notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ $clangTidyNotes -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:pencil2: Clang-Tidy found :pencil2: $clangTidyNotes notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: Clang-Tidy found no errors, warnings or notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# List enabled checks in the report
|
||||
echo "<details><summary>:information_source: Enabled checks</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}clang-tidy-enabled-checks.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}clang-tidy.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $clangTidyErrors -eq 0 ]
|
||||
- name: Clazy
|
||||
if: inputs.checkClazy && inputs.changedCppFiles != '' && always()
|
||||
continue-on-error: ${{ inputs.clazyFailSilent }}
|
||||
run: |
|
||||
clazyErrors=0
|
||||
clazyWarnings=0
|
||||
clazyNotes=0
|
||||
sudo apt-get install -y --no-install-recommends clazy
|
||||
#TODO: check where this "clazy.yaml" goes ; shall this be put in the fixes ?
|
||||
# Run clazy on all cpp files
|
||||
clazy-standalone --export-fixes=clazy.yaml -checks=${{ inputs.clazyChecks }} -p build/ ${{ inputs.changedCppFiles }} &>> ${{ env.logdir }}clazy.log || true
|
||||
# If clazy has run successfully, write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}clazy.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/clang.json"
|
||||
cat ${{ env.logdir }}clazy.log
|
||||
echo "::remove-matcher owner=clang::"
|
||||
clazyErrors=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): error: .+$" ${{ env.logdir }}clazy.log | wc -l ) || true
|
||||
clazyWarnings=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): warning: .+$" ${{ env.logdir }}clazy.log | wc -l ) || true
|
||||
clazyNotes=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): note: .+$" ${{ env.logdir }}clazy.log | wc -l ) || true
|
||||
fi
|
||||
echo "Found $clazyErrors errors, $clazyWarnings warnings, $clazyNotes notes"
|
||||
# Write the report
|
||||
if [ "$clazyErrors" -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:fire: Clazy found :fire: $clazyErrors errors, :warning: $clazyWarnings warnings and :pencil2: $clazyNotes notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ "$clazyWarnings" -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:warning: Clazy found :warning: $clazyWarnings warnings and :pencil2: $clazyNotes notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ "$clazyNotes" -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:pencil2: Clazy found :pencil2: $clazyNotes notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: Clazy found no errors, warnings or notes</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "[List of checks](https://github.com/KDE/clazy#list-of-checks), [This explains some of the clazy warnings](https://www.kdab.com/uncovering-32-qt-best-practices-compile-time-clazy/) " >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}clazy.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $clazyErrors -eq 0 ]
|
||||
- name: Clazy-QT6
|
||||
if: inputs.checkClazyQT6 && inputs.changedCppFiles != '' && github.ref == inputs.QT6Branch && always()
|
||||
continue-on-error: ${{ inputs.clazyQT6FailSilent }}
|
||||
run: |
|
||||
clazyQT6Errors=0
|
||||
clazyQT6Warnings=0
|
||||
clazyQT6Notes=0
|
||||
sudo apt-get install -y --no-install-recommends clazy
|
||||
#TODO: check where this "clazyQT6.yaml" goes ; shall this be put in the fixes ?
|
||||
# Run clazy checks for Qt6 on all cpp files
|
||||
clazy-standalone --export-fixes=clazyQT6.yaml -checks=${{ inputs.clazyQT6Checks }} -p build/ ${{ inputs.changedCppFiles }} &>> ${{ env.logdir }}clazyQT6.log || true
|
||||
# If clazy has run successfully, write the Log to the console with the Problem Matchers
|
||||
if [ -f ${{ env.logdir }}clazyQT6.log ]
|
||||
then
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/clang.json"
|
||||
cat ${{ env.logdir }}clazyQT6.log
|
||||
echo "::remove-matcher owner=clang::"
|
||||
clazyQT6Errors=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): error: .+$" ${{ env.logdir }}clazyQT6.log | wc -l ) || true
|
||||
clazyQT6Warnings=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): warning: .+$" ${{ env.logdir }}clazyQT6.log | wc -l ) || true
|
||||
clazyQT6Notes=$(grep -nIHE "^(.+):([0-9]+):([0-9]+): note: .+$" ${{ env.logdir }}clazyQT6.log | wc -l ) || true
|
||||
fi
|
||||
echo "Found $clazyQT6Errors errors, $clazyQT6Warnings warnings, $clazyQT6Notes notes"
|
||||
# Write the report
|
||||
if [ "$clazyQT6Errors" -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:fire: Clazy found :fire: $clazyQT6Errors errors, :warning: $clazyQT6Warnings warnings and :pencil2: $clazyQT6Notes notes for porting to QT6</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ "$clazyQT6Warnings" -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:warning: Clazy found :warning: $clazyQT6Warnings warnings and :pencil2: $clazyQT6Notes notes for porting to QT6</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
elif [ "$clazyNotes" -gt 0 ]
|
||||
then
|
||||
echo "<details><summary>:pencil2: Clazy found :pencil2: $clazyQT6Notes notes for porting to QT6</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
else
|
||||
echo "<details><summary>:heavy_check_mark: Clazy found no errors, warnings or notes for porting to QT6</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
fi
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}clazyQT6.log >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo '```' >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
[ $clazyQT6Errors -eq 0 ]
|
||||
- name: Upload logs and fixes
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
${{ env.fixesdir }}
|
||||
- name: Upload report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ env.reportfilename }}
|
||||
path: |
|
||||
${{env.reportdir}}${{ env.reportfilename }}
|
||||
@@ -1,162 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD 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 *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is the pre-check workflow for CI of FreeCAD.
|
||||
# It aims at running some basic checks about the workflow run ...
|
||||
# ... and gathering some data needed for the next steps.
|
||||
|
||||
name: Prepare
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
artifactBasename:
|
||||
type: string
|
||||
required: true
|
||||
dontFailOnOldRebase:
|
||||
default: true
|
||||
type: boolean
|
||||
required: false
|
||||
maxRebaseHours:
|
||||
default: "48"
|
||||
type: string
|
||||
required: false
|
||||
outputs:
|
||||
reportFile:
|
||||
value: ${{ jobs.Prepare.outputs.reportFile }}
|
||||
changedFiles:
|
||||
value: ${{ jobs.Prepare.outputs.changedFiles }}
|
||||
changedPythonFiles:
|
||||
value: ${{ jobs.Prepare.outputs.changedPythonFiles }}
|
||||
changedCppFiles:
|
||||
value: ${{ jobs.Prepare.outputs.changedCppFiles }}
|
||||
|
||||
jobs:
|
||||
|
||||
Prepare:
|
||||
env:
|
||||
isPR: ${{ github.event_name == 'pull_request' }}
|
||||
isPush: ${{ github.event_name == 'push' }}
|
||||
logdir: /tmp/logs/
|
||||
reportdir: /tmp/report/
|
||||
reportfilename: ${{ inputs.artifactBasename }}-report.md
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
outputs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
changedFiles: ${{ steps.Output.outputs.changedFiles }}
|
||||
changedPythonFiles: ${{ steps.Output.outputs.changedPythonFiles }}
|
||||
changedCppFiles: ${{ steps.Output.outputs.changedCppFiles }}
|
||||
|
||||
steps:
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
mkdir -p ${{ env.logdir }}
|
||||
mkdir -p ${{ env.reportdir }}
|
||||
commitCnt=0
|
||||
touch ${{ env.logdir }}changedFiles.lst ${{ env.logdir }}changedCppFiles.lst ${{ env.logdir }}changedPythonFiles.lst
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
- name: Determine base and head SHA in case of PR
|
||||
if: env.isPR == 'true'
|
||||
run: |
|
||||
baseSha=${{ github.event.pull_request.base.sha }}
|
||||
headSha=${{ github.event.pull_request.head.sha }}
|
||||
echo "baseSha=$baseSha" >> $GITHUB_ENV
|
||||
echo "headSha=$headSha" >> $GITHUB_ENV
|
||||
echo "This CI run is performed on a Pull Request" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "Base SHA is $baseSha, Head SHA is $headSha" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: Check if PR has been recently rebased
|
||||
if: env.isPR == 'true'
|
||||
continue-on-error: ${{ inputs.dontFailOnOldRebase }}
|
||||
run: |
|
||||
baseDate=$(curl -H "Accept: application/vnd.github+json" -H "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/commits/$baseSha | jq -r '.commit.committer.date')
|
||||
dateDiff=$(( ( $(date +%s) - $(date -d $baseDate +%s) ) / 3600 ))
|
||||
echo "Pull request is based on a $dateDiff hour-old commit" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
|
||||
# Exit the step with appropriate code
|
||||
if [ $dateDiff -gt ${{ inputs.maxRebaseHours }} ]
|
||||
then
|
||||
echo -n ":warning: Pull request should be rebased" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
|
||||
exit 1
|
||||
fi
|
||||
- name: Determine base and head SHA in case of push
|
||||
if: env.isPush == 'true'
|
||||
run: |
|
||||
baseSha=${{ github.event.before }}
|
||||
headSha=${{ github.event.after }}
|
||||
echo "headSha=$headSha" >> $GITHUB_ENV
|
||||
if [ $baseSha -eq 0 ]
|
||||
then
|
||||
echo "This CI run is performed on a Push that created a new branch : files changed will be ignored" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "Head SHA is $headSha" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "isPush='false'" >> $GITHUB_ENV
|
||||
else
|
||||
echo "This CI run is performed on a Push" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "Base SHA is $baseSha, Head SHA is $headSha" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "baseSha=$baseSha" >> $GITHUB_ENV
|
||||
fi
|
||||
- name: Get compare between head and base
|
||||
if: env.isPR == 'true' || env.isPush == 'true'
|
||||
run: |
|
||||
echo "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/compare/$baseSha...$headSha"
|
||||
curl -H "Accept: application/vnd.github+json" -H "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/compare/$baseSha...$headSha > ${{ env.logdir }}compare.json
|
||||
- name: Get number of commits in the changeset
|
||||
if: env.isPR == 'true' || env.isPush == 'true'
|
||||
run: |
|
||||
commitCnt=$(jq -re '.ahead_by' ${{ env.logdir }}compare.json)
|
||||
echo "Changeset is composed of $commitCnt commit(s)" | tee -a ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: Get files modified in changeset #TODO check what happens with deleted file in the subsequent process
|
||||
if: env.isPR == 'true' || env.isPush == 'true'
|
||||
run: |
|
||||
jq '.files[] | if .status != "removed" then .filename else empty end' ${{ env.logdir }}compare.json > ${{ env.logdir }}changedFiles.lst
|
||||
grep -E '\.(py|py3)"' ${{ env.logdir }}changedFiles.lst > ${{ env.logdir }}changedPythonFiles.lst || true
|
||||
grep -E '\.(c|c\+\+|cc|cpp|cu|cuh|cxx|h|h\+\+|hh|hpp|hxx)"' ${{ env.logdir }}changedFiles.lst > ${{ env.logdir }}changedCppFiles.lst || true
|
||||
# Write the report
|
||||
echo "::group::Modified files in changeset (removed files are ignored) :" ; cat ${{ env.logdir }}changedFiles.lst ; echo "::endgroup::"
|
||||
echo "<details><summary>Modified files (removed files are ignored):</summary>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
cat ${{ env.logdir }}changedFiles.lst >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "</details>" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
echo "" >> ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: Transmitting outputs
|
||||
id: Output
|
||||
run: |
|
||||
echo "changedFiles=$(cat ${{ env.logdir }}changedFiles.lst | tr '\n' ' ')" >> $GITHUB_OUTPUT
|
||||
echo "changedPythonFiles=$(cat ${{ env.logdir }}changedPythonFiles.lst | tr '\n' ' ')" >> $GITHUB_OUTPUT
|
||||
echo "changedCppFiles=$(cat ${{ env.logdir }}changedCppFiles.lst | tr '\n' ' ')" >> $GITHUB_OUTPUT
|
||||
echo "" >> $GITHUB_OUTPUT
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
- name: Upload report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ env.reportfilename }}
|
||||
path: |
|
||||
${{env.reportdir}}${{ env.reportfilename }}
|
||||
@@ -1,117 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD 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 *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is a generic wrapup workflow that only aims at gathering reports and ...
|
||||
# ... presenting them as a unified summary
|
||||
#
|
||||
# It expects steps to be summarized to be presented a JSON input formatted ...
|
||||
# ... as the "needs" context of Github :
|
||||
# https://docs.github.com/en/actions/learn-github-actions/contexts#needs-context
|
||||
# In addition to standard "result", each step shall have a string entry in "outputs" ...
|
||||
# ... named "reportFile" containing the name of the corresponding report. The ...
|
||||
# ... report file shall be available in an artifact with the same name.
|
||||
|
||||
name: WrapUp
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
previousSteps:
|
||||
type: string
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
|
||||
WrapUp:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
artifactsDownloadDir: /tmp/artifacts/
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
steps:
|
||||
- name: Make needed directories, files and initializations
|
||||
run: |
|
||||
mkdir -p ${{ env.artifactsDownloadDir }}
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
path: ${{ env.artifactsDownloadDir }}
|
||||
- name: Save input data to file
|
||||
run: |
|
||||
cat > data << "EOD"
|
||||
${{ inputs.previousSteps }}
|
||||
EOD
|
||||
- name: Compute the report
|
||||
run: |
|
||||
echo "usedArtifacts<<EOD" >> $GITHUB_ENV
|
||||
for step in $(jq -r "keys_unsorted | .[]" data)
|
||||
do
|
||||
echo "Processing step $step"
|
||||
result=$(jq -r ".\"$step\".result" data)
|
||||
icon=":heavy_check_mark:"
|
||||
if [ $result == 'failure' ]
|
||||
then
|
||||
icon=":x:"
|
||||
elif [ $result == 'cancelled' ]
|
||||
then
|
||||
icon=":no_entry_sign:"
|
||||
elif [ $result == 'skipped' ]
|
||||
then
|
||||
icon=":white_check_mark:"
|
||||
fi
|
||||
echo "### $icon $step step" >> report.md
|
||||
if [ $result == 'skipped' ]
|
||||
then
|
||||
echo "Step was skipped, no report was generated" | tee -a report.md
|
||||
continue
|
||||
elif [ $result == 'cancelled' ]
|
||||
then
|
||||
echo "Step was cancelled when executing, report may be incomplete" | tee -a report.md
|
||||
fi
|
||||
report=$(jq -r ".\"$step\".outputs.reportFile" data)
|
||||
if [ $report ]
|
||||
then
|
||||
echo "Report for step $step is $report"
|
||||
echo "$report" >> $GITHUB_ENV
|
||||
if [ $(find ${{ env.artifactsDownloadDir }} -type f -name $report | wc -l) -eq 1 ]
|
||||
then
|
||||
find ${{ env.artifactsDownloadDir }} -type f -name $report -exec cat {} \; >> report.md
|
||||
else
|
||||
echo "No or several files found for report $report, not printing" | tee -a report.md
|
||||
echo "Below files found :"
|
||||
find ${{ env.artifactsDownloadDir }} -type f -name $report
|
||||
fi
|
||||
else
|
||||
echo "Report file was not set by step $step" | tee -a report.md
|
||||
fi
|
||||
echo "" >> report.md
|
||||
done
|
||||
echo "EOD" >> $GITHUB_ENV
|
||||
cat report.md >> $GITHUB_STEP_SUMMARY
|
||||
- name: Delete used artifacts
|
||||
continue-on-error: true
|
||||
uses: geekyeggo/delete-artifact@v2
|
||||
with:
|
||||
name: |
|
||||
${{ env.usedArtifacts }}
|
||||
+1
-49
@@ -1,51 +1,3 @@
|
||||
# file types to ignore
|
||||
.*
|
||||
!/.gitignore
|
||||
!/.clang-format
|
||||
!/.git-blame-ignore-revs
|
||||
!/.gitattributes
|
||||
*.DS_Store
|
||||
*.pyc
|
||||
*.obj
|
||||
*.lib
|
||||
*.pch
|
||||
*.vcproj
|
||||
*.kdev4
|
||||
*.exp
|
||||
*.dep
|
||||
*.manifest
|
||||
*.o
|
||||
*.orig
|
||||
*.output
|
||||
qrc_*.cpp
|
||||
BuildLog.htm
|
||||
cmake_install.cmake
|
||||
*~
|
||||
CMakeFiles/
|
||||
*qrc.depends
|
||||
ui_*.h
|
||||
moc_*.cpp
|
||||
Makefile
|
||||
CMakeCache.txt
|
||||
CMakeLists.txt.user
|
||||
config.h
|
||||
install_manifest.txt
|
||||
/bin/
|
||||
/ALL_BUILD.dir/
|
||||
/doc/
|
||||
/lib/
|
||||
/Mod/
|
||||
/ZERO_CHECK.dir/
|
||||
/build/
|
||||
/cmake-build*/
|
||||
/src/Tools/offlinedoc/localwiki/
|
||||
/src/Tools/offlinedoc/*.txt
|
||||
/conda/environment.yml
|
||||
OpenSCAD_rc.py
|
||||
tags
|
||||
|
||||
# crowdin file
|
||||
src/Tools/freecad.zip
|
||||
tsupdate_stderr.log
|
||||
tsupdate_stdout.log
|
||||
files_to_translate.txt
|
||||
*.pyc
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
# See https://pre-commit.com for more information
|
||||
# See https://pre-commit.com/hooks.html for more hooks
|
||||
files: |
|
||||
(?x)^(
|
||||
tests/src
|
||||
)
|
||||
exclude: |
|
||||
(?x)^(
|
||||
.*vcproj.*|
|
||||
.*vcxproj.*|
|
||||
src|
|
||||
tests/src
|
||||
)
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v3.4.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
- id: end-of-file-fixer
|
||||
- id: check-yaml
|
||||
- id: check-added-large-files
|
||||
- id: mixed-line-ending
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 22.12.0
|
||||
hooks:
|
||||
- id: black
|
||||
args: ['--line-length', '100']
|
||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||
rev: v15.0.7
|
||||
hooks:
|
||||
- id: clang-format
|
||||
@@ -1,614 +0,0 @@
|
||||
[MAIN]
|
||||
|
||||
# Analyse import fallback blocks. This can be used to support both Python 2 and
|
||||
# 3 compatible code, which means that the block might have code that exists
|
||||
# only in one or another interpreter, leading to false positives when analysed.
|
||||
analyse-fallback-blocks=yes
|
||||
|
||||
# Load and enable all available extensions. Use --list-extensions to see a list
|
||||
# all available extensions.
|
||||
#enable-all-extensions=
|
||||
|
||||
# In error mode, messages with a category besides ERROR or FATAL are
|
||||
# suppressed, and no reports are done by default. Error mode is compatible with
|
||||
# disabling specific errors.
|
||||
#errors-only=
|
||||
|
||||
# Always return a 0 (non-error) status code, even if lint errors are found.
|
||||
# This is primarily useful in continuous integration scripts.
|
||||
#exit-zero=
|
||||
|
||||
# A comma-separated list of package or module names from where C extensions may
|
||||
# be loaded. Extensions are loading into the active Python interpreter and may
|
||||
# run arbitrary code.
|
||||
extension-pkg-allow-list=
|
||||
|
||||
# A comma-separated list of package or module names from where C extensions may
|
||||
# be loaded. Extensions are loading into the active Python interpreter and may
|
||||
# run arbitrary code. (This is an alternative name to extension-pkg-allow-list
|
||||
# for backward compatibility.)
|
||||
extension-pkg-whitelist=
|
||||
|
||||
# Return non-zero exit code if any of these messages/categories are detected,
|
||||
# even if score is above --fail-under value. Syntax same as enable. Messages
|
||||
# specified are enabled, while categories only check already-enabled messages.
|
||||
fail-on=
|
||||
|
||||
# Specify a score threshold to be exceeded before program exits with error.
|
||||
fail-under=10
|
||||
|
||||
# Interpret the stdin as a python script, whose filename needs to be passed as
|
||||
# the module_or_package argument.
|
||||
#from-stdin=
|
||||
|
||||
# Files or directories to be skipped. They should be base names, not paths.
|
||||
ignore=CVS
|
||||
|
||||
# Add files or directories matching the regex patterns to the ignore-list. The
|
||||
# regex matches against paths and can be in Posix or Windows format.
|
||||
ignore-paths=
|
||||
|
||||
# Files or directories matching the regex patterns are skipped. The regex
|
||||
# matches against base names, not paths. The default value ignores Emacs file
|
||||
# locks
|
||||
ignore-patterns=^\.#
|
||||
|
||||
# List of module names for which member attributes should not be checked
|
||||
# (useful for modules/projects where namespaces are manipulated during runtime
|
||||
# and thus existing member attributes cannot be deduced by static analysis). It
|
||||
# supports qualified module names, as well as Unix pattern matching.
|
||||
ignored-modules=FreeCAD,FreeCADGui
|
||||
|
||||
# Python code to execute, usually for sys.path manipulation such as
|
||||
# pygtk.require().
|
||||
#init-hook=
|
||||
|
||||
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
|
||||
# number of processors available to use, and will cap the count on Windows to
|
||||
# avoid hangs.
|
||||
jobs=1
|
||||
|
||||
# Control the amount of potential inferred values when inferring a single
|
||||
# object. This can help the performance when dealing with large functions or
|
||||
# complex, nested conditions.
|
||||
limit-inference-results=100
|
||||
|
||||
# List of plugins (as comma separated values of python module names) to load,
|
||||
# usually to register additional checkers.
|
||||
load-plugins=
|
||||
|
||||
# Pickle collected data for later comparisons.
|
||||
persistent=yes
|
||||
|
||||
# Minimum Python version to use for version dependent checks. Will default to
|
||||
# the version used to run pylint.
|
||||
py-version=3.8
|
||||
|
||||
# Discover python modules and packages in the file system subtree.
|
||||
recursive=no
|
||||
|
||||
# When enabled, pylint would attempt to guess common misconfiguration and emit
|
||||
# user-friendly hints instead of false-positive error messages.
|
||||
suggestion-mode=yes
|
||||
|
||||
# Allow loading of arbitrary C extensions. Extensions are imported into the
|
||||
# active Python interpreter and may run arbitrary code.
|
||||
unsafe-load-any-extension=no
|
||||
|
||||
# In verbose mode, extra non-checker-related info will be displayed.
|
||||
#verbose=
|
||||
|
||||
|
||||
[REPORTS]
|
||||
|
||||
# Python expression which should return a score less than or equal to 10. You
|
||||
# have access to the variables 'fatal', 'error', 'warning', 'refactor',
|
||||
# 'convention', and 'info' which contain the number of messages in each
|
||||
# category, as well as 'statement' which is the total number of statements
|
||||
# analyzed. This score is used by the global evaluation report (RP0004).
|
||||
evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10))
|
||||
|
||||
# Template used to display messages. This is a python new-style format string
|
||||
# used to format the message information. See doc for all details.
|
||||
msg-template=
|
||||
|
||||
# Set the output format. Available formats are text, parseable, colorized, json
|
||||
# and msvs (visual studio). You can also give a reporter class, e.g.
|
||||
# mypackage.mymodule.MyReporterClass.
|
||||
#output-format=
|
||||
|
||||
# Tells whether to display a full report or only the messages.
|
||||
reports=yes
|
||||
|
||||
# Activate the evaluation score.
|
||||
score=yes
|
||||
|
||||
|
||||
[MESSAGES CONTROL]
|
||||
|
||||
# Only show warnings with the listed confidence levels. Leave empty to show
|
||||
# all. Valid levels: HIGH, CONTROL_FLOW, INFERENCE, INFERENCE_FAILURE,
|
||||
# UNDEFINED.
|
||||
confidence=HIGH,
|
||||
CONTROL_FLOW,
|
||||
INFERENCE,
|
||||
INFERENCE_FAILURE,
|
||||
UNDEFINED
|
||||
|
||||
# Disable the message, report, category or checker with the given id(s). You
|
||||
# can either give multiple identifiers separated by comma (,) or put this
|
||||
# option multiple times (only on the command line, not in the configuration
|
||||
# file where it should appear only once). You can also use "--disable=all" to
|
||||
# disable everything first and then re-enable specific checks. For example, if
|
||||
# you want to run only the similarities checker, you can use "--disable=all
|
||||
# --enable=similarities". If you want to run only the classes checker, but have
|
||||
# no Warning level messages displayed, use "--disable=all --enable=classes
|
||||
# --disable=W".
|
||||
disable=raw-checker-failed,
|
||||
bad-inline-option,
|
||||
locally-disabled,
|
||||
file-ignored,
|
||||
suppressed-message,
|
||||
useless-suppression,
|
||||
deprecated-pragma,
|
||||
use-symbolic-message-instead,
|
||||
invalid-name,
|
||||
wrong-import-order,
|
||||
import-error,
|
||||
undefined-variable
|
||||
|
||||
# Enable the message, report, category or checker with the given id(s). You can
|
||||
# either give multiple identifier separated by comma (,) or put this option
|
||||
# multiple time (only on the command line, not in the configuration file where
|
||||
# it should appear only once). See also the "--disable" option for examples.
|
||||
enable=c-extension-no-member
|
||||
|
||||
|
||||
[BASIC]
|
||||
|
||||
# Naming style matching correct argument names.
|
||||
argument-naming-style=snake_case
|
||||
|
||||
# Regular expression matching correct argument names. Overrides argument-
|
||||
# naming-style. If left empty, argument names will be checked with the set
|
||||
# naming style.
|
||||
#argument-rgx=
|
||||
|
||||
# Naming style matching correct attribute names.
|
||||
attr-naming-style=snake_case
|
||||
|
||||
# Regular expression matching correct attribute names. Overrides attr-naming-
|
||||
# style. If left empty, attribute names will be checked with the set naming
|
||||
# style.
|
||||
#attr-rgx=
|
||||
|
||||
# Bad variable names which should always be refused, separated by a comma.
|
||||
bad-names=foo,
|
||||
bar,
|
||||
baz,
|
||||
toto,
|
||||
tutu,
|
||||
tata
|
||||
|
||||
# Bad variable names regexes, separated by a comma. If names match any regex,
|
||||
# they will always be refused
|
||||
bad-names-rgxs=
|
||||
|
||||
# Naming style matching correct class attribute names.
|
||||
class-attribute-naming-style=any
|
||||
|
||||
# Regular expression matching correct class attribute names. Overrides class-
|
||||
# attribute-naming-style. If left empty, class attribute names will be checked
|
||||
# with the set naming style.
|
||||
#class-attribute-rgx=
|
||||
|
||||
# Naming style matching correct class constant names.
|
||||
class-const-naming-style=UPPER_CASE
|
||||
|
||||
# Regular expression matching correct class constant names. Overrides class-
|
||||
# const-naming-style. If left empty, class constant names will be checked with
|
||||
# the set naming style.
|
||||
#class-const-rgx=
|
||||
|
||||
# Naming style matching correct class names.
|
||||
class-naming-style=PascalCase
|
||||
|
||||
# Regular expression matching correct class names. Overrides class-naming-
|
||||
# style. If left empty, class names will be checked with the set naming style.
|
||||
#class-rgx=
|
||||
|
||||
# Naming style matching correct constant names.
|
||||
const-naming-style=UPPER_CASE
|
||||
|
||||
# Regular expression matching correct constant names. Overrides const-naming-
|
||||
# style. If left empty, constant names will be checked with the set naming
|
||||
# style.
|
||||
#const-rgx=
|
||||
|
||||
# Minimum line length for functions/classes that require docstrings, shorter
|
||||
# ones are exempt.
|
||||
docstring-min-length=4
|
||||
|
||||
# Naming style matching correct function names.
|
||||
function-naming-style=snake_case
|
||||
|
||||
# Regular expression matching correct function names. Overrides function-
|
||||
# naming-style. If left empty, function names will be checked with the set
|
||||
# naming style.
|
||||
#function-rgx=
|
||||
|
||||
# Good variable names which should always be accepted, separated by a comma.
|
||||
good-names=i,
|
||||
j,
|
||||
k,
|
||||
ex,
|
||||
Run,
|
||||
_
|
||||
|
||||
# Good variable names regexes, separated by a comma. If names match any regex,
|
||||
# they will always be accepted
|
||||
good-names-rgxs=
|
||||
|
||||
# Include a hint for the correct naming format with invalid-name.
|
||||
include-naming-hint=no
|
||||
|
||||
# Naming style matching correct inline iteration names.
|
||||
inlinevar-naming-style=any
|
||||
|
||||
# Regular expression matching correct inline iteration names. Overrides
|
||||
# inlinevar-naming-style. If left empty, inline iteration names will be checked
|
||||
# with the set naming style.
|
||||
#inlinevar-rgx=
|
||||
|
||||
# Naming style matching correct method names.
|
||||
method-naming-style=snake_case
|
||||
|
||||
# Regular expression matching correct method names. Overrides method-naming-
|
||||
# style. If left empty, method names will be checked with the set naming style.
|
||||
#method-rgx=
|
||||
|
||||
# Naming style matching correct module names.
|
||||
module-naming-style=snake_case
|
||||
|
||||
# Regular expression matching correct module names. Overrides module-naming-
|
||||
# style. If left empty, module names will be checked with the set naming style.
|
||||
#module-rgx=
|
||||
|
||||
# Colon-delimited sets of names that determine each other's naming style when
|
||||
# the name regexes allow several styles.
|
||||
name-group=
|
||||
|
||||
# Regular expression which should only match function or class names that do
|
||||
# not require a docstring.
|
||||
no-docstring-rgx=^_
|
||||
|
||||
# List of decorators that produce properties, such as abc.abstractproperty. Add
|
||||
# to this list to register other decorators that produce valid properties.
|
||||
# These decorators are taken in consideration only for invalid-name.
|
||||
property-classes=abc.abstractproperty
|
||||
|
||||
# Regular expression matching correct type variable names. If left empty, type
|
||||
# variable names will be checked with the set naming style.
|
||||
#typevar-rgx=
|
||||
|
||||
# Naming style matching correct variable names.
|
||||
variable-naming-style=snake_case
|
||||
|
||||
# Regular expression matching correct variable names. Overrides variable-
|
||||
# naming-style. If left empty, variable names will be checked with the set
|
||||
# naming style.
|
||||
#variable-rgx=
|
||||
|
||||
|
||||
[CLASSES]
|
||||
|
||||
# Warn about protected attribute access inside special methods
|
||||
check-protected-access-in-special-methods=no
|
||||
|
||||
# List of method names used to declare (i.e. assign) instance attributes.
|
||||
defining-attr-methods=__init__,
|
||||
__new__,
|
||||
setUp,
|
||||
__post_init__
|
||||
|
||||
# List of member names, which should be excluded from the protected access
|
||||
# warning.
|
||||
exclude-protected=_asdict,
|
||||
_fields,
|
||||
_replace,
|
||||
_source,
|
||||
_make
|
||||
|
||||
# List of valid names for the first argument in a class method.
|
||||
valid-classmethod-first-arg=cls
|
||||
|
||||
# List of valid names for the first argument in a metaclass class method.
|
||||
valid-metaclass-classmethod-first-arg=cls
|
||||
|
||||
|
||||
[REFACTORING]
|
||||
|
||||
# Maximum number of nested blocks for function / method body
|
||||
max-nested-blocks=5
|
||||
|
||||
# Complete name of functions that never returns. When checking for
|
||||
# inconsistent-return-statements if a never returning function is called then
|
||||
# it will be considered as an explicit return statement and no message will be
|
||||
# printed.
|
||||
never-returning-functions=sys.exit,argparse.parse_error
|
||||
|
||||
|
||||
[DESIGN]
|
||||
|
||||
# List of regular expressions of class ancestor names to ignore when counting
|
||||
# public methods (see R0903)
|
||||
exclude-too-few-public-methods=
|
||||
|
||||
# List of qualified class names to ignore when counting class parents (see
|
||||
# R0901)
|
||||
ignored-parents=
|
||||
|
||||
# Maximum number of arguments for function / method.
|
||||
max-args=5
|
||||
|
||||
# Maximum number of attributes for a class (see R0902).
|
||||
max-attributes=15
|
||||
|
||||
# Maximum number of boolean expressions in an if statement (see R0916).
|
||||
max-bool-expr=5
|
||||
|
||||
# Maximum number of branch for function / method body.
|
||||
max-branches=12
|
||||
|
||||
# Maximum number of locals for function / method body.
|
||||
max-locals=15
|
||||
|
||||
# Maximum number of parents for a class (see R0901).
|
||||
max-parents=7
|
||||
|
||||
# Maximum number of public methods for a class (see R0904).
|
||||
max-public-methods=20
|
||||
|
||||
# Maximum number of return / yield for function / method body.
|
||||
max-returns=6
|
||||
|
||||
# Maximum number of statements in function / method body.
|
||||
max-statements=50
|
||||
|
||||
# Minimum number of public methods for a class (see R0903).
|
||||
min-public-methods=1
|
||||
|
||||
|
||||
[EXCEPTIONS]
|
||||
|
||||
# Exceptions that will emit a warning when caught.
|
||||
overgeneral-exceptions=builtins.BaseException,
|
||||
builtins.Exception
|
||||
|
||||
|
||||
[FORMAT]
|
||||
|
||||
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
|
||||
expected-line-ending-format=
|
||||
|
||||
# Regexp for a line that is allowed to be longer than the limit.
|
||||
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
|
||||
|
||||
# Number of spaces of indent required inside a hanging or continued line.
|
||||
indent-after-paren=4
|
||||
|
||||
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
|
||||
# tab).
|
||||
indent-string=' '
|
||||
|
||||
# Maximum number of characters on a single line.
|
||||
max-line-length=100
|
||||
|
||||
# Maximum number of lines in a module.
|
||||
max-module-lines=1000
|
||||
|
||||
# Allow the body of a class to be on the same line as the declaration if body
|
||||
# contains single statement.
|
||||
single-line-class-stmt=no
|
||||
|
||||
# Allow the body of an if to be on the same line as the test if there is no
|
||||
# else.
|
||||
single-line-if-stmt=no
|
||||
|
||||
|
||||
[IMPORTS]
|
||||
|
||||
# List of modules that can be imported at any level, not just the top level
|
||||
# one.
|
||||
allow-any-import-level=
|
||||
|
||||
# Allow wildcard imports from modules that define __all__.
|
||||
allow-wildcard-with-all=no
|
||||
|
||||
# Deprecated modules which should not be used, separated by a comma.
|
||||
deprecated-modules=PySide2
|
||||
|
||||
# Output a graph (.gv or any supported image format) of external dependencies
|
||||
# to the given file (report RP0402 must not be disabled).
|
||||
ext-import-graph=
|
||||
|
||||
# Output a graph (.gv or any supported image format) of all (i.e. internal and
|
||||
# external) dependencies to the given file (report RP0402 must not be
|
||||
# disabled).
|
||||
import-graph=
|
||||
|
||||
# Output a graph (.gv or any supported image format) of internal dependencies
|
||||
# to the given file (report RP0402 must not be disabled).
|
||||
int-import-graph=
|
||||
|
||||
# Force import order to recognize a module as part of the standard
|
||||
# compatibility libraries.
|
||||
known-standard-library=
|
||||
|
||||
# Force import order to recognize a module as part of a third party library.
|
||||
known-third-party=enchant
|
||||
|
||||
# Couples of modules and preferred modules, separated by a comma.
|
||||
preferred-modules=
|
||||
|
||||
|
||||
[LOGGING]
|
||||
|
||||
# The type of string formatting that logging methods do. `old` means using %
|
||||
# formatting, `new` is for `{}` formatting.
|
||||
logging-format-style=old
|
||||
|
||||
# Logging modules to check that the string format arguments are in logging
|
||||
# function parameter format.
|
||||
logging-modules=logging
|
||||
|
||||
|
||||
[MISCELLANEOUS]
|
||||
|
||||
# List of note tags to take in consideration, separated by a comma.
|
||||
notes=FIXME,
|
||||
XXX,
|
||||
TODO
|
||||
|
||||
# Regular expression of note tags to take in consideration.
|
||||
notes-rgx=
|
||||
|
||||
|
||||
[SIMILARITIES]
|
||||
|
||||
# Comments are removed from the similarity computation
|
||||
ignore-comments=yes
|
||||
|
||||
# Docstrings are removed from the similarity computation
|
||||
ignore-docstrings=yes
|
||||
|
||||
# Imports are removed from the similarity computation
|
||||
ignore-imports=yes
|
||||
|
||||
# Signatures are removed from the similarity computation
|
||||
ignore-signatures=yes
|
||||
|
||||
# Minimum lines number of a similarity.
|
||||
min-similarity-lines=4
|
||||
|
||||
|
||||
[SPELLING]
|
||||
|
||||
# Limits count of emitted suggestions for spelling mistakes.
|
||||
max-spelling-suggestions=4
|
||||
|
||||
# Spelling dictionary name. Available dictionaries: none. To make it work,
|
||||
# install the 'python-enchant' package.
|
||||
spelling-dict=
|
||||
|
||||
# List of comma separated words that should be considered directives if they
|
||||
# appear at the beginning of a comment and should not be checked.
|
||||
spelling-ignore-comment-directives=fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy:
|
||||
|
||||
# List of comma separated words that should not be checked.
|
||||
spelling-ignore-words=
|
||||
|
||||
# A path to a file that contains the private dictionary; one word per line.
|
||||
spelling-private-dict-file=
|
||||
|
||||
# Tells whether to store unknown words to the private dictionary (see the
|
||||
# --spelling-private-dict-file option) instead of raising a message.
|
||||
spelling-store-unknown-words=no
|
||||
|
||||
|
||||
[STRING]
|
||||
|
||||
# This flag controls whether inconsistent-quotes generates a warning when the
|
||||
# character used as a quote delimiter is used inconsistently within a module.
|
||||
check-quote-consistency=no
|
||||
|
||||
# This flag controls whether the implicit-str-concat should generate a warning
|
||||
# on implicit string concatenation in sequences defined over several lines.
|
||||
check-str-concat-over-line-jumps=no
|
||||
|
||||
|
||||
[TYPECHECK]
|
||||
|
||||
# List of decorators that produce context managers, such as
|
||||
# contextlib.contextmanager. Add to this list to register other decorators that
|
||||
# produce valid context managers.
|
||||
contextmanager-decorators=contextlib.contextmanager
|
||||
|
||||
# List of members which are set dynamically and missed by pylint inference
|
||||
# system, and so shouldn't trigger E1101 when accessed. Python regular
|
||||
# expressions are accepted.
|
||||
generated-members=
|
||||
|
||||
# Tells whether to warn about missing members when the owner of the attribute
|
||||
# is inferred to be None.
|
||||
ignore-none=yes
|
||||
|
||||
# This flag controls whether pylint should warn about no-member and similar
|
||||
# checks whenever an opaque object is returned when inferring. The inference
|
||||
# can return multiple potential results while evaluating a Python object, but
|
||||
# some branches might not be evaluated, which results in partial inference. In
|
||||
# that case, it might be useful to still emit no-member and other checks for
|
||||
# the rest of the inferred objects.
|
||||
ignore-on-opaque-inference=yes
|
||||
|
||||
# List of symbolic message names to ignore for Mixin members.
|
||||
ignored-checks-for-mixins=no-member,
|
||||
not-async-context-manager,
|
||||
not-context-manager,
|
||||
attribute-defined-outside-init
|
||||
|
||||
# List of class names for which member attributes should not be checked (useful
|
||||
# for classes with dynamically set attributes). This supports the use of
|
||||
# qualified names.
|
||||
ignored-classes=optparse.Values,thread._local,_thread._local,argparse.Namespace
|
||||
|
||||
# Show a hint with possible names when a member name was not found. The aspect
|
||||
# of finding the hint is based on edit distance.
|
||||
missing-member-hint=yes
|
||||
|
||||
# The minimum edit distance a name should have in order to be considered a
|
||||
# similar match for a missing member name.
|
||||
missing-member-hint-distance=1
|
||||
|
||||
# The total number of similar names that should be taken in consideration when
|
||||
# showing a hint for a missing member.
|
||||
missing-member-max-choices=1
|
||||
|
||||
# Regex pattern to define which classes are considered mixins.
|
||||
mixin-class-rgx=.*[Mm]ixin
|
||||
|
||||
# List of decorators that change the signature of a decorated function.
|
||||
signature-mutators=
|
||||
|
||||
|
||||
[VARIABLES]
|
||||
|
||||
# List of additional names supposed to be defined in builtins. Remember that
|
||||
# you should avoid defining new builtins when possible.
|
||||
additional-builtins=
|
||||
|
||||
# Tells whether unused global variables should be treated as a violation.
|
||||
allow-global-unused-variables=yes
|
||||
|
||||
# List of names allowed to shadow builtins
|
||||
allowed-redefined-builtins=
|
||||
|
||||
# List of strings which can identify a callback function by name. A callback
|
||||
# name must start or end with one of those strings.
|
||||
callbacks=cb_,
|
||||
_cb
|
||||
|
||||
# A regular expression matching the name of dummy variables (i.e. expected to
|
||||
# not be used).
|
||||
dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
|
||||
|
||||
# Argument names that match this expression will be ignored. Default to name
|
||||
# with leading underscore.
|
||||
ignored-argument-names=_.*|^ignored_|^unused_
|
||||
|
||||
# Tells whether we should check for unused import in __init__ files.
|
||||
init-import=no
|
||||
|
||||
# List of qualified module names which can have objects that can redefine
|
||||
# builtins.
|
||||
redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
|
||||
Vendored
-12
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "FreeCAD",
|
||||
"includePath": ["${workspaceFolder}/**"],
|
||||
"cStandard": "c17",
|
||||
"cppStandard": "c++17",
|
||||
"configurationProvider": "ms-vscode.cmake-tools"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
Vendored
-18
@@ -1,18 +0,0 @@
|
||||
[
|
||||
{
|
||||
"name": "FreeCAD Linux",
|
||||
"compilers": {
|
||||
"C": "${workspaceFolder}/.conda/freecad/bin/cc",
|
||||
"CXX": "${workspaceFolder}/.conda/freecad/bin/c++"
|
||||
},
|
||||
"environmentSetupScript": "${workspaceFolder}/.vscode/env.sh"
|
||||
},
|
||||
{
|
||||
"name": "FreeCAD macOS",
|
||||
"compilers": {
|
||||
"C": "${workspaceFolder}/.conda/freecad/bin/clang",
|
||||
"CXX": "${workspaceFolder}/.conda/freecad/bin/clang++"
|
||||
},
|
||||
"environmentSetupScript": "${workspaceFolder}/.vscode/env.sh"
|
||||
}
|
||||
]
|
||||
Vendored
-3
@@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
source activate freecad
|
||||
Vendored
-6
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"ms-vscode.cpptools-extension-pack",
|
||||
"ms-python.python"
|
||||
]
|
||||
}
|
||||
Vendored
-48
@@ -1,48 +0,0 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "C/C++: Linux: build and debug FreeCAD",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/build/bin/FreeCAD",
|
||||
"args": [],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"preLaunchTask": "CMake: build"
|
||||
},
|
||||
{
|
||||
"name": "C/C++: macOS: build and debug FreeCAD",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/build/bin/FreeCAD",
|
||||
"args": [],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"MIMode": "lldb",
|
||||
"preLaunchTask": "CMake: build"
|
||||
},
|
||||
{
|
||||
"name": "Python: Remote Attach",
|
||||
"type": "python",
|
||||
"request": "attach",
|
||||
"preLaunchTask": "conda: activate environment",
|
||||
"redirectOutput": true,
|
||||
"connect": {
|
||||
"host": "localhost",
|
||||
"port": 5678
|
||||
},
|
||||
"pathMappings": [
|
||||
{
|
||||
"localRoot": "${workspaceFolder}",
|
||||
"remoteRoot": "${workspaceFolder}"
|
||||
}
|
||||
],
|
||||
"justMyCode": false
|
||||
}
|
||||
]
|
||||
}
|
||||
Vendored
-17
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"__config": "cpp",
|
||||
"iosfwd": "cpp",
|
||||
"vector": "cpp",
|
||||
"tuple": "cpp"
|
||||
},
|
||||
"editor.formatOnType": true,
|
||||
"cmake.preferredGenerators": ["Ninja", "NMake Makefiles"],
|
||||
"cmake.cmakePath": "${workspaceFolder}/.conda/freecad/bin/cmake",
|
||||
"cmake.configureSettings": {
|
||||
"BUILD_WITH_CONDA:BOOL": "ON",
|
||||
"BUILD_FEM_NETGEN:BOOL": "ON",
|
||||
"FREECAD_USE_PYBIND11:BOOL": "ON",
|
||||
"FREECAD_USE_EXTERNAL_SMESH:BOOL": "ON"
|
||||
}
|
||||
}
|
||||
Vendored
-58
@@ -1,58 +0,0 @@
|
||||
{
|
||||
"tasks": [
|
||||
{
|
||||
"type": "shell",
|
||||
"label": "conda: activate environment",
|
||||
"command": "activate freecad",
|
||||
"problemMatcher": [],
|
||||
"detail": "Activate conda environment",
|
||||
"group": "build"
|
||||
},
|
||||
{
|
||||
"type": "cmake",
|
||||
"label": "CMake: configure",
|
||||
"command": "configure",
|
||||
"problemMatcher": [],
|
||||
"detail": "CMake template configure task",
|
||||
"group": "build"
|
||||
},
|
||||
{
|
||||
"type": "cmake",
|
||||
"label": "CMake: build",
|
||||
"command": "build",
|
||||
"targets": ["all"],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"problemMatcher": [],
|
||||
"detail": "CMake template build task"
|
||||
},
|
||||
{
|
||||
"type": "cmake",
|
||||
"label": "CMake: test",
|
||||
"command": "test",
|
||||
"problemMatcher": [],
|
||||
"detail": "CMake template test task",
|
||||
"group": "build"
|
||||
},
|
||||
{
|
||||
"type": "cmake",
|
||||
"label": "CMake: clean",
|
||||
"command": "clean",
|
||||
"problemMatcher": [],
|
||||
"detail": "CMake template clean task",
|
||||
"group": "build"
|
||||
},
|
||||
{
|
||||
"type": "cmake",
|
||||
"label": "CMake: clean rebuild",
|
||||
"command": "cleanRebuild",
|
||||
"targets": ["all"],
|
||||
"problemMatcher": [],
|
||||
"detail": "CMake template clean rebuild task",
|
||||
"group": "build"
|
||||
}
|
||||
],
|
||||
"version": "2.0.0"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
@echo off
|
||||
rem Build script, uses vcbuild to completetly build FreeCAD
|
||||
|
||||
rem start again nice (LOW)
|
||||
if "%1"=="" (
|
||||
start /WAIT /LOW /B cmd.exe /V /C %~s0 go_ahead
|
||||
goto:eof
|
||||
)
|
||||
rem set the aprobiated Variables here or outside in the system
|
||||
if NOT DEFINED VCDIR set VCDIR=C:\Program Files\Microsoft Visual Studio 9.0
|
||||
|
||||
rem Register VS Build programms
|
||||
call "%VCDIR%\VC\vcvarsall.bat"
|
||||
|
||||
rem "C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:update /path:"C:\SW_Projects\CAD\FreeCAD_10" /closeonend:3
|
||||
|
||||
|
||||
rem Start the Visuall Studio build process
|
||||
"%VCDIR%\VC\vcpackages\vcbuild.exe" FreeCAD_trunk.sln "Debug|Win32"
|
||||
"%VCDIR%\VC\vcpackages\vcbuild.exe" FreeCAD_trunk.sln "Debug|Win32"
|
||||
"%VCDIR%\VC\vcpackages\vcbuild.exe" FreeCAD_trunk.sln "Release|Win32"
|
||||
@@ -0,0 +1,19 @@
|
||||
# Version of the release. The Revision number you must specify at the command line
|
||||
[Version]
|
||||
Major: 0
|
||||
Minor: 7
|
||||
Alias: Bespin
|
||||
Url: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk
|
||||
|
||||
# Here comes the paths of the needed tools to build a release
|
||||
# the path can be simple or as full path. Depends if you have your tool in PATH
|
||||
[Tools]
|
||||
svn: C:\Program Files (x86)\Subversion\svn.exe
|
||||
wget: C:\Libs\FreeCADLibs\FreeCADLibs6.2\bin\wget.exe
|
||||
candle: C:\Libs\Libs\wix_30\candle.exe
|
||||
light: C:\Libs\Libs\wix_30\light.exe
|
||||
hhc: C:\Program Files (x86)\HTML Help Workshop\hhc.exe
|
||||
|
||||
# needet until the build is completely done with cMake
|
||||
[Libs] # Libs used in the build
|
||||
FreecadLib: C:\Libs\FreeCADLibs\FreeCADLibs6.2
|
||||
+342
@@ -0,0 +1,342 @@
|
||||
#! python
|
||||
# -*- coding: utf-8 -*-
|
||||
# (c) 2007 Jürgen Riegel GPL
|
||||
|
||||
Usage = """BuildRelease - Build script to build a complete FreeCAD release
|
||||
|
||||
Usage:
|
||||
BuildRelease [Optionen] ReleaseNbr
|
||||
|
||||
Options:
|
||||
-h, --help print this help
|
||||
-b, --buildPath specify the output path where the build takes place
|
||||
-i, --ini-file specify the ini file to use
|
||||
|
||||
This script will build a complete FreeCAD distribution which includes:
|
||||
* Check out fresh source
|
||||
* packing source
|
||||
* Set the Version and Release numbers
|
||||
* Gathering change log
|
||||
* completele build FreeCAD
|
||||
* run tests
|
||||
* build source docu
|
||||
* build user docu
|
||||
* build installer
|
||||
* upload to source forge
|
||||
|
||||
On failure of one of these steps the script will stop.
|
||||
Each step writes tones of info in the log file.
|
||||
There is one error log file.
|
||||
|
||||
Autor:
|
||||
(c) 2007 Juergen Riegel
|
||||
juergen.riegel@web.de
|
||||
Licence: GPL
|
||||
|
||||
Version:
|
||||
0.1
|
||||
"""
|
||||
#
|
||||
# Its inteded only to used by the maintainer
|
||||
|
||||
import os, sys, getopt
|
||||
from subprocess import call,Popen,PIPE
|
||||
from time import sleep
|
||||
from zipfile import ZipFile,ZIP_DEFLATED
|
||||
import tarfile
|
||||
from string import find
|
||||
import ConfigParser
|
||||
import time
|
||||
|
||||
|
||||
# global information
|
||||
Release = 0
|
||||
Major = 0
|
||||
Minor = 7
|
||||
Alias = ""
|
||||
FileName = ""
|
||||
BuildPath = "D:/ReleaseBuilds"
|
||||
Log = None
|
||||
ErrLog = None
|
||||
Config = None
|
||||
|
||||
|
||||
def CallProcess(args,Msg,ret=True):
|
||||
Anim = ['-','\\','|','/']
|
||||
|
||||
sys.stdout.write(Msg+': ')
|
||||
Log.write("====== Call: " + args[0] + '\n')
|
||||
SVN = Popen(args,
|
||||
stdout=PIPE, stderr = ErrLog)
|
||||
|
||||
i = 0
|
||||
while(SVN.poll() == None):
|
||||
line = SVN.stdout.readline()
|
||||
if(line):
|
||||
Log.write(line.replace('\n',''))
|
||||
sys.stdout.write(chr(8) + Anim[i%4])
|
||||
i+=1
|
||||
sleep(0.2)
|
||||
|
||||
#ErrLog.write(SVN.stdout.read())
|
||||
sys.stdout.write(chr(8) + "done\n")
|
||||
if(not SVN.returncode == 0 and ret):
|
||||
print "Process returns: ",SVN.returncode
|
||||
raise
|
||||
|
||||
# Step 2 & 3
|
||||
def CheckOut():
|
||||
|
||||
CallProcess([Config.get('Tools','svn'),
|
||||
"checkout",
|
||||
"-r",
|
||||
`Release`,
|
||||
"https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk",
|
||||
"../"+FileName],
|
||||
"2) Checking out")
|
||||
|
||||
sys.stdout.write('3) Write version files: ')
|
||||
|
||||
Version = open("src/Build/Version.h","w")
|
||||
Version.write('#define FCVersionMajor "' + `Major` + '"\n')
|
||||
Version.write('#define FCVersionMinor "' + `Minor` + '"\n')
|
||||
Version.write('#define FCVersionName "' + Alias + '"\n')
|
||||
Version.write('#define FCRevision "' + `Release` + '"\n')
|
||||
Version.write('#define FCRepositoryURL "' + "https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk/src" + '"\n')
|
||||
Version.write('#define FCCurrentDateT "'+time.asctime()+'" \n')
|
||||
Version.close()
|
||||
|
||||
Version = open("installer/Version.wxi","w")
|
||||
Version.write('<Include> \n')
|
||||
Version.write(' <?define FCVersionMajor = ' + `Major` + ' ?>\n')
|
||||
Version.write(' <?define FCVersionMinor = ' + `Minor` + ' ?>\n')
|
||||
Version.write(' <?define FCVersionRevision =' + `Release` + ' ?>\n')
|
||||
Version.write(' <?define FCVersionAlias = "' + Alias + '" ?>\n')
|
||||
Version.write('</Include> \n')
|
||||
Version.close()
|
||||
|
||||
sys.stdout.write('done\n')
|
||||
|
||||
|
||||
#Step 4
|
||||
def PackSourceZip():
|
||||
|
||||
def addAll(dirFrom, ZipSrcFile):
|
||||
for file in os.listdir(dirFrom): # for files/dirs here
|
||||
if(not file==".svn" and not file== FileName+'_source.zip'):
|
||||
pathFrom = os.path.join(dirFrom, file)
|
||||
if not os.path.isdir(pathFrom): # copy simple files
|
||||
ZipSrcFile.write(pathFrom,pathFrom.replace('.\\',FileName+'\\'))
|
||||
Log.write("Insert: "+ pathFrom + '\n')
|
||||
else:
|
||||
addAll(pathFrom,ZipSrcFile)
|
||||
|
||||
sys.stdout.write("4) Pack zip source files: ")
|
||||
|
||||
SourceFile = ZipFile(FileName+'_source.zip','w',ZIP_DEFLATED,True)
|
||||
addAll('.',SourceFile)
|
||||
SourceFile.close()
|
||||
|
||||
sys.stdout.write("done \n")
|
||||
|
||||
# Step 5
|
||||
def PackSourceTar():
|
||||
|
||||
def addAll(dirFrom, ZipTarFile):
|
||||
for file in os.listdir(dirFrom): # for files/dirs here
|
||||
if(not file==".svn" and not file== FileName+'_source.zip'):
|
||||
pathFrom = os.path.join(dirFrom, file)
|
||||
if not os.path.isdir(pathFrom): # copy simple files
|
||||
ZipTarFile.add(pathFrom,pathFrom.replace('.\\',FileName+'\\'))
|
||||
Log.write("Insert: "+ pathFrom + '\n')
|
||||
else:
|
||||
addAll(pathFrom,ZipTarFile)
|
||||
|
||||
sys.stdout.write("5) Pack tar source files: ")
|
||||
|
||||
SourceFile = tarfile.open(FileName+'_source.tgz','w:gz')
|
||||
addAll('.',SourceFile)
|
||||
SourceFile.close()
|
||||
|
||||
sys.stdout.write("done \n")
|
||||
|
||||
|
||||
# Step 6 & 7
|
||||
def BuildAll():
|
||||
import fcbt.FileTools
|
||||
LibPack = Config.get('Libs','FreeCADLib')
|
||||
|
||||
sys.stdout.write('6) Copy resources: ')
|
||||
os.mkdir('./bin')
|
||||
fcbt.FileTools.cpall(LibPack + '/bin','./bin')
|
||||
os.mkdir('./include')
|
||||
fcbt.FileTools.cpall(LibPack + '/include','./include')
|
||||
os.mkdir('./lib')
|
||||
fcbt.FileTools.cpall(LibPack + '/lib','./lib')
|
||||
os.mkdir('./doc')
|
||||
fcbt.FileTools.cpall(LibPack + '/doc','./doc')
|
||||
sys.stdout.write('done\n')
|
||||
|
||||
CallProcess(["BuildAll.bat"],
|
||||
"7) Build all")
|
||||
|
||||
# Step 8 & 9
|
||||
def HelpFile():
|
||||
import wiki2chm
|
||||
if not os.path.isdir('doc'):
|
||||
os.mkdir('doc')
|
||||
if not os.path.isdir('doc/tmp'):
|
||||
os.mkdir('doc/tmp')
|
||||
|
||||
CallProcess([Config.get('Tools','wget'),'-k', '-r', '-l5', '-P', 'doc/tmp', '-nd',
|
||||
'-R', '*action=*',
|
||||
'-R', '*title=Special*',
|
||||
'-R', '*title=Talk*',
|
||||
'-R', '*oldid=*',
|
||||
'-R', '*printable=yes*',
|
||||
'--domains=apps.sourceforge.net',
|
||||
'--append-output=doc/tmp/wget.log',
|
||||
'http://apps.sourceforge.net/mediawiki/free-cad/index.php?title=Online_Help_Toc'],
|
||||
"8) Download docu")
|
||||
|
||||
sys.stdout.write("9) Fix up CSS: ")
|
||||
open('doc/tmp/chm.css','w').write(open('src/Tools/chm.css').read())
|
||||
|
||||
wiki2chm.WikiBaseUrl ='http://apps.sourceforge.net/mediawiki/free-cad/'
|
||||
wiki2chm.TocPageName ='Online_Help_Toc'
|
||||
wiki2chm.BasePath ='doc/tmp/'
|
||||
wiki2chm.Output = Log
|
||||
|
||||
wiki2chm.replaceCSS()
|
||||
|
||||
wiki2chm.WriteProject()
|
||||
wiki2chm.readToc()
|
||||
sys.stdout.write("done \n")
|
||||
|
||||
# Step 10
|
||||
def CompileHelp():
|
||||
import fcbt.FileTools
|
||||
CallProcess([Config.get('Tools','hhc'),'doc/tmp/Online_Help_Toc.hhp'],'10)Compile help:',False)
|
||||
fcbt.FileTools.cpfile('doc/tmp/FreeCAD.chm','doc/FreeCAD.chm')
|
||||
fcbt.FileTools.cpfile('doc/tmp/FreeCAD.chm',FileName+'_helpfile.chm')
|
||||
|
||||
def BuildInstaller():
|
||||
import fcbt.FileTools
|
||||
LibPack = Config.get('Libs','FreeCADLib')
|
||||
|
||||
fcbt.FileTools.cpfile('lib/Microsoft_VC80_CRT_x86.msm','installer/Microsoft_VC80_CRT_x86.msm')
|
||||
fcbt.FileTools.cpfile('lib/policy_8_0_Microsoft_VC80_CRT_x86.msm','installer/policy_8_0_Microsoft_VC80_CRT_x86.msm')
|
||||
CallProcess([Config.get('Tools','candle'),
|
||||
'-out', 'installer\\',
|
||||
'installer\\FreeCAD.wxs',
|
||||
'installer\\FreeCADBase.wxs',
|
||||
'installer\\LibPack.wxs',
|
||||
'installer\\FreeCADDoc.wxs',
|
||||
'installer\\FreeCADModules.wxs',
|
||||
],'11)Compile installer:',False)
|
||||
CallProcess([Config.get('Tools','light'),
|
||||
'-ext', 'WixUIExtension',
|
||||
'-cultures:en-us',
|
||||
'-out', 'installer\\FreeCAD.msi',
|
||||
'installer\\FreeCAD.wixobj',
|
||||
'installer\\FreeCADBase.wixobj',
|
||||
'installer\\LibPack.wixobj',
|
||||
'installer\\FreeCADDoc.wixobj',
|
||||
'installer\\FreeCADModules.wixobj',
|
||||
],'12)Build installer:',False)
|
||||
|
||||
fcbt.FileTools.cpfile('installer/FreeCAD.msi',FileName+'_installer.msi')
|
||||
|
||||
def SendFTP():
|
||||
from ftplib import FTP
|
||||
ftp = FTP('upload.sf.net')
|
||||
Log.write(ftp.login() + '\n')
|
||||
Log.write(ftp.cwd("/incoming") + '\n')
|
||||
Log.write(ftp.sendcmd('PASV') + '\n')
|
||||
Log.write(ftp.sendcmd('TYPE I') + '\n')
|
||||
sys.stdout.write('13) Send source ZIP: ')
|
||||
f = open(FileName+'_source.zip', "r")
|
||||
Log.write(ftp.storbinary('STOR '+ FileName+'_source.zip', f) + '\n')
|
||||
sys.stdout.write('done\n14) Send source tgz: ')
|
||||
f = open(FileName+'_source.tgz', "r")
|
||||
Log.write(ftp.storbinary('STOR '+ FileName+'_source.tgz', f) + '\n')
|
||||
sys.stdout.write('done\n15) Send installer: ')
|
||||
f = open(FileName+'_installer.msi', "r")
|
||||
Log.write(ftp.storbinary('STOR '+ FileName+'_installer.msi', f) + '\n')
|
||||
f.close()
|
||||
ftp.close()
|
||||
|
||||
def main():
|
||||
global Release, Major, Minor, Alias, FileName, BuildPath, Log, ErrLog, Config
|
||||
IniFile = "BuildRelease.ini"
|
||||
try:
|
||||
opts, args = getopt.getopt(sys.argv[1:], "hb:", ["help","buildPath="])
|
||||
except getopt.GetoptError:
|
||||
# print help information and exit:
|
||||
sys.stderr.write(Usage)
|
||||
sys.exit(2)
|
||||
|
||||
# checking on the options
|
||||
for o, a in opts:
|
||||
if o in ("-h", "--help"):
|
||||
sys.stderr.write(Usage)
|
||||
sys.exit()
|
||||
if o in ("-b", "--buildPath"):
|
||||
BuildPath = a
|
||||
if o in ("-i", "--ini-file"):
|
||||
IniFile = a
|
||||
|
||||
|
||||
# runing through the files
|
||||
if (not len(args) == 1):
|
||||
sys.stderr.write(Usage)
|
||||
|
||||
Release = int(args[0])
|
||||
|
||||
Config = ConfigParser.ConfigParser()
|
||||
Config.readfp(open(IniFile))
|
||||
|
||||
Alias = Config.get('Version','Alias')
|
||||
Major = Config.getint('Version','Major')
|
||||
Minor = Config.getint('Version','Minor')
|
||||
|
||||
# creating the directory and switch to
|
||||
FileName = 'FreeCAD_' + `Major` + '.' + `Minor` + '.' + `Release`
|
||||
print "=== Building:", FileName, '\n'
|
||||
BuildPath = BuildPath + '/' + FileName
|
||||
# set tool path
|
||||
sys.path.append((BuildPath + '/src/Tools') )
|
||||
OldCwd = os.getcwd()
|
||||
print "1) Creating Build directory: ", BuildPath
|
||||
if not os.path.isdir(BuildPath):
|
||||
os.mkdir(BuildPath)
|
||||
os.chdir(BuildPath)
|
||||
Log = open("BuildRelease.log","w")
|
||||
ErrLog = open("BuildReleaseErrors.log","w")
|
||||
|
||||
try:
|
||||
CheckOut()
|
||||
PackSourceZip()
|
||||
PackSourceTar()
|
||||
BuildAll()
|
||||
HelpFile()
|
||||
CompileHelp()
|
||||
BuildInstaller()
|
||||
#SendFTP()
|
||||
except:
|
||||
Log.close()
|
||||
ErrLog.close()
|
||||
Err = open("BuildReleaseErrors.log","r")
|
||||
sys.stderr.write("!!!!!!!!! Fehler aufgetreten:\n")
|
||||
sys.stderr.write(Err.read())
|
||||
raise
|
||||
|
||||
os.chdir(OldCwd)
|
||||
Log.close()
|
||||
ErrLog.close()
|
||||
|
||||
print "Press any key"
|
||||
sys.stdin.readline()
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
+530
-93
@@ -1,115 +1,552 @@
|
||||
# As of January 2023 we require CMake 3.16.3
|
||||
# see https://forum.freecad.org/viewtopic.php?f=10&t=72173
|
||||
# for further info why
|
||||
cmake_minimum_required(VERSION 3.16.3 FATAL_ERROR)
|
||||
project(FreeCAD_trunk)
|
||||
set(FREECAD_VERSION "0.13")
|
||||
|
||||
# policy CMP0072 was introduced with CMake 3.11
|
||||
# relates to FindOpenGL module
|
||||
# and cache variables OPENGL_gl_LIBRARY, OPENGL_glu_LIBRARY
|
||||
if (POLICY CMP0072)
|
||||
set(OpenGL_GL_PREFERENCE LEGACY)
|
||||
endif(POLICY CMP0072)
|
||||
|
||||
if (BUILD_WITH_CONDA AND WIN32)
|
||||
option(FREECAD_USE_CCACHE "Auto detect and use ccache during compilation" OFF)
|
||||
else()
|
||||
option(FREECAD_USE_CCACHE "Auto detect and use ccache during compilation" ON)
|
||||
endif()
|
||||
|
||||
if(FREECAD_USE_CCACHE)
|
||||
find_program(CCACHE_PROGRAM ccache) #This check should occur before project()
|
||||
if(CCACHE_PROGRAM)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
project(FreeCAD)
|
||||
# Needed for salomesmesh
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
ENABLE_LANGUAGE(Fortran)
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
set(PACKAGE_NAME "FreeCAD")
|
||||
set(PACKAGE_VERSION_MAJOR "0")
|
||||
set(PACKAGE_VERSION_MINOR "21")
|
||||
set(PACKAGE_VERSION_PATCH "2") # number of patch release (e.g. "4" for the 0.18.4 release)
|
||||
set(PACKAGE_VERSION_SUFFIX "") # either "dev" for development snapshot or "" (empty string)
|
||||
set(PACKAGE_BUILD_VERSION "0") # used when the same FreeCAD version will be re-released (for example using an updated LibPack)
|
||||
|
||||
set(PACKAGE_VERSION_MINOR "12")
|
||||
set(PACKAGE_VERSION_PATCH "2237")
|
||||
set(PACKAGE_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}.${PACKAGE_VERSION_PATCH}")
|
||||
set(PACKAGE_STRING "${PROJECT_NAME} ${PACKAGE_VERSION}")
|
||||
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
|
||||
|
||||
# include local modules
|
||||
include(CheckCXXCompilerFlag)
|
||||
cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)
|
||||
|
||||
# include local modules
|
||||
include(AddFileDependencies)
|
||||
include(cMake/FreeCadMacros.cmake)
|
||||
# include helper functions/macros
|
||||
add_subdirectory(cMake/FreeCAD_Helpers)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cMake")
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cMake")
|
||||
|
||||
|
||||
if(COMMAND cmake_policy)
|
||||
cmake_policy(SET CMP0003 NEW)
|
||||
endif(COMMAND cmake_policy)
|
||||
|
||||
#if(CMAKE_CFG_INTDIR STREQUAL .)
|
||||
# No Debug/Release output paths
|
||||
set(DEBUG_MAIN_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
|
||||
set(RELEASE_MAIN_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
|
||||
#else(CMAKE_CFG_INTDIR STREQUAL .)
|
||||
# set(DEBUG_MAIN_OUTPUT_PATH ${CMAKE_BINARY_DIR}/src/Main/Debug)
|
||||
# set(RELEASE_MAIN_OUTPUT_PATH ${CMAKE_BINARY_DIR}/src/Main/Release)
|
||||
#endif(CMAKE_CFG_INTDIR STREQUAL .)
|
||||
|
||||
if(WIN32)
|
||||
set(PLATFORM_CP xcopy /Y /S)
|
||||
set(PLATFORM_MK mkdir)
|
||||
else(WIN32)
|
||||
set(PLATFORM_CP cp)
|
||||
set(PLATFORM_MK mkdir -p)
|
||||
endif(WIN32)
|
||||
|
||||
|
||||
# ================================================================================
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
include(cMake/ConfigureChecks.cmake)
|
||||
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
add_definitions(-DHAVE_CONFIG_H)
|
||||
add_definitions(-Wno-write-strings)
|
||||
add_definitions(-Wno-deprecated)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
|
||||
# get linker errors as soon as possible and not at runtime e.g. for modules
|
||||
if(UNIX)
|
||||
# SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined")
|
||||
endif(UNIX)
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
|
||||
# ================================================================================
|
||||
# Output directories for install target
|
||||
|
||||
if(WIN32)
|
||||
SET(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "Installation root directory")
|
||||
else(WIN32)
|
||||
SET(CMAKE_INSTALL_PREFIX "/usr/lib${LIB_SUFFIX}/freecad" CACHE PATH "Installation root directory")
|
||||
SET(INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
|
||||
endif(WIN32)
|
||||
|
||||
SET(CMAKE_INSTALL_DATADIR data CACHE PATH "Output directory for data and resource files")
|
||||
SET(CMAKE_INSTALL_INCLUDEDIR include CACHE PATH "Output directory for header files")
|
||||
SET(CMAKE_INSTALL_DOCDIR doc CACHE PATH "Output directory for documentation and license files")
|
||||
|
||||
# used as compiler defines
|
||||
SET(RESOURCEDIR "${CMAKE_INSTALL_DATADIR}")
|
||||
SET(DOCDIR "${CMAKE_INSTALL_DOCDIR}")
|
||||
|
||||
MESSAGE( STATUS "prefix: ${CMAKE_INSTALL_PREFIX}")
|
||||
MESSAGE(STATUS "datadir: ${CMAKE_INSTALL_DATADIR}")
|
||||
MESSAGE(STATUS "docdir: ${CMAKE_INSTALL_DOCDIR}")
|
||||
MESSAGE(STATUS "includedir: ${CMAKE_INSTALL_INCLUDEDIR}")
|
||||
|
||||
# ==============================================================================
|
||||
# == Win32 is default behaviour use the LibPack copied in Source tree ==========
|
||||
if(MSVC)
|
||||
OPTION(FREECAD_LIBPACK_USE "Use the LibPack to Build FreeCAD (only Win32 so far)." ON)
|
||||
set(FREECAD_LIBPACK_DIR ${CMAKE_SOURCE_DIR} CACHE PATH "Directory of the FreeCAD LibPack")
|
||||
else(MSVC)
|
||||
OPTION(FREECAD_LIBPACK_USE "Use the LibPack to Build FreeCAD (only Win32 so far)." OFF)
|
||||
set(FREECAD_LIBPACK_DIR "" CACHE PATH "Directory of the FreeCAD LibPack")
|
||||
endif(MSVC)
|
||||
|
||||
# ==============================================================================
|
||||
# == All the options for the build process ============
|
||||
|
||||
OPTION(FREECAD_BUILD_GUI "Build FreeCAD Gui. Otherwise you have only the command line and the Python import module." ON)
|
||||
OPTION(FREECAD_MAINTAINERS_BUILD "Build FreeCAD for Maintainers, with Docu and 3rd party libs. On Windows the Installer is build." OFF)
|
||||
OPTION(FREECAD_BUILD_CAM "Build the FreeCAD CAM module and the needed libs, be aware, unfinished code!" OFF)
|
||||
OPTION(FREECAD_BUILD_FEM "Build the FreeCAD FEM module, be aware, unfinished code!" ON)
|
||||
OPTION(FREECAD_BUILD_SANDBOX "Build the FreeCAD Sandbox module which is only for testing purposes" OFF)
|
||||
OPTION(FREECAD_BUILD_TEMPLATE "Build the FreeCAD template module which is only for testing purposes" OFF)
|
||||
OPTION(FREECAD_BUILD_DEBIAN "Prepare for a build of a Debian package" OFF)
|
||||
OPTION(FREECAD_USE_EXTERNAL_ZIPIOS "Use system installed zipios++ instead of the bundled." OFF)
|
||||
OPTION(FREECAD_USE_EXTERNAL_PIVY "Use system installed python-pivy instead of the bundled." OFF)
|
||||
if(MSVC)
|
||||
OPTION(FREECAD_USE_3DCONNEXION "Use the 3D connexion SDK to support 3d mouse." ON)
|
||||
else(MSVC)
|
||||
set(FREECAD_USE_3DCONNEXION OFF)
|
||||
endif(MSVC)
|
||||
|
||||
# if this is set override some options
|
||||
if (FREECAD_BUILD_DEBIAN)
|
||||
set(FREECAD_USE_EXTERNAL_ZIPIOS ON)
|
||||
set(FREECAD_USE_EXTERNAL_PIVY ON)
|
||||
endif (FREECAD_BUILD_DEBIAN)
|
||||
|
||||
if (NOT EXISTS ${CMAKE_SOURCE_DIR}/src/zipios++)
|
||||
set(FREECAD_USE_EXTERNAL_ZIPIOS ON)
|
||||
endif ()
|
||||
|
||||
# ==============================================================================
|
||||
|
||||
if(FREECAD_LIBPACK_USE)
|
||||
# checking for a unique file in LibPack location to make sure the right version of the LibPack is there
|
||||
find_file(FREECAD_LIBPACK_CHECKFILE6X boost_program_options-vc80-mt-gd.lib ${FREECAD_LIBPACK_DIR}/lib )
|
||||
find_file(FREECAD_LIBPACK_CHECKFILE7X boost_program_options-vc90-mt-gd-1_39.lib ${FREECAD_LIBPACK_DIR}/lib )
|
||||
find_file(FREECAD_LIBPACK_CHECKFILE8X boost_program_options-vc90-mt-gd-1_48.lib ${FREECAD_LIBPACK_DIR}/lib )
|
||||
find_file(FREECAD_LIBPACK_CHECKCUSTOM boost_program_options-vc90-mt-gd-1_41.lib ${FREECAD_LIBPACK_DIR}/lib )
|
||||
IF(FREECAD_LIBPACK_CHECKFILE6X)
|
||||
include(cMake/UseLibPack6x.cmake)
|
||||
set(FREECAD_LIBPACK6 FOUND CACHE STRING "Displays if the libpack has been found")
|
||||
set(FREECAD_LIBPACK7 NOTFOUND CACHE STRING "Displays if the libpack has been found")
|
||||
MARK_AS_ADVANCED(FORCE FREECAD_LIBPACK7)
|
||||
ELSEIF(FREECAD_LIBPACK_CHECKFILE7X)
|
||||
include(cMake/UseLibPack7x.cmake)
|
||||
set(FREECAD_LIBPACK6 NOTFOUND CACHE STRING "Displays if the libpack has been found")
|
||||
MARK_AS_ADVANCED(FORCE FREECAD_LIBPACK6)
|
||||
set(FREECAD_LIBPACK7 FOUND CACHE STRING "Displays if the libpack has been found")
|
||||
ELSEIF(FREECAD_LIBPACK_CHECKFILE8X)
|
||||
include(cMake/UseLibPack8x.cmake)
|
||||
set(FREECAD_LIBPACK6 NOTFOUND CACHE STRING "Displays if the libpack has been found")
|
||||
set(FREECAD_LIBPACK7 NOTFOUND CACHE STRING "Displays if the libpack has been found")
|
||||
set(SWIG_EXECUTABLE ${FREECAD_LIBPACK_DIR}/tools/swigwin-1.3.40/swig.exe)
|
||||
MARK_AS_ADVANCED(FORCE FREECAD_LIBPACK6)
|
||||
set(FREECAD_LIBPACK8 FOUND CACHE STRING "Displays if the libpack has been found")
|
||||
ELSEIF(FREECAD_LIBPACK_CHECKCUSTOM)
|
||||
include(cMake/UseLibPackCustom.cmake)
|
||||
set(FREECAD_LIBPACKX FOUND CACHE STRING "Displays if the libpack has been found")
|
||||
ELSE(FREECAD_LIBPACK_CHECKFILE6X)
|
||||
MARK_AS_ADVANCED(FORCE FREECAD_LIBPACK_CHECKFILE6X FREECAD_LIBPACK_CHECKFILE7X)
|
||||
message(SEND_ERROR "Could not find neither LibPack 6.x nor 7.x in specified location:" ${FREECAD_LIBPACK_DIR})
|
||||
ENDIF(FREECAD_LIBPACK_CHECKFILE6X)
|
||||
|
||||
# -------------------------------- Swig ----------------------------------
|
||||
|
||||
find_package(SWIG)
|
||||
|
||||
IF(NOT SWIG_FOUND)
|
||||
MESSAGE("SWIG was not found, build no SWIG binding for pivy")
|
||||
ENDIF(NOT SWIG_FOUND)
|
||||
|
||||
else(FREECAD_LIBPACK_USE)
|
||||
|
||||
MARK_AS_ADVANCED(FORCE FREECAD_LIBPACK_CHECKFILE6X FREECAD_LIBPACK_CHECKFILE7X)
|
||||
|
||||
|
||||
|
||||
# ================================================================================
|
||||
# == for other OSes search the packages ==========================================
|
||||
|
||||
|
||||
# -------------------------------- Python --------------------------------
|
||||
|
||||
|
||||
#http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=677598
|
||||
set(Python_ADDITIONAL_VERSIONS "2.3" "2.4" "2.5" "2.6" "2.7" "2.8" "2.9")
|
||||
find_package(PythonInterp REQUIRED)
|
||||
IF (NOT DEFINED PYTHON_VERSION_STRING)
|
||||
find_package(PythonLibs REQUIRED)
|
||||
ELSE (NOT DEFINED PYTHON_VERSION_STRING)
|
||||
find_package(PythonLibs ${PYTHON_VERSION_STRING} EXACT)
|
||||
ENDIF(NOT DEFINED PYTHON_VERSION_STRING)
|
||||
|
||||
IF(NOT PYTHONLIBS_FOUND)
|
||||
MESSAGE("Python not found, install python!")
|
||||
ENDIF(NOT PYTHONLIBS_FOUND)
|
||||
|
||||
|
||||
|
||||
# -------------------------------- Boost --------------------------------
|
||||
|
||||
SET( _boost_TEST_VERSIONS ${Boost_ADDITIONAL_VERSIONS} "1.41.0" "1.39.0" "1.38.0" "1.37.0"
|
||||
"1.36.1" "1.36.0" "1.35.1" "1.35.0" "1.35" "1.34.1" "1.34.0" "1.34"
|
||||
"1.33.1" "1.33.0" "1.33" )
|
||||
|
||||
find_package(Boost COMPONENTS filesystem program_options regex signals system thread REQUIRED)
|
||||
|
||||
# -------------------------------- XercesC --------------------------------
|
||||
|
||||
find_package(XercesC REQUIRED)
|
||||
|
||||
# -------------------------------- ZLIB --------------------------------
|
||||
|
||||
CompilerChecksAndSetups()
|
||||
ConfigureCMakeVariables()
|
||||
InitializeFreeCADBuildOptions()
|
||||
CheckInterModuleDependencies()
|
||||
FreeCADLibpackChecks()
|
||||
SetupDoxygen()
|
||||
SetupLibFmt()
|
||||
if(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
|
||||
SetupPython()
|
||||
SetupPCL()
|
||||
SetupPybind11()
|
||||
SetupXercesC()
|
||||
find_package(ZLIB REQUIRED)
|
||||
find_package(PyCXX REQUIRED)
|
||||
SetupOpenCasCade()
|
||||
if(BUILD_GUI)
|
||||
# Do this before the check for SMESH because it depends on vtk
|
||||
# that may have its own OpenGL check but possibly fails and leaves
|
||||
# OPENGL_gl_LIBRARY empty that results into linker errors
|
||||
SetupOpenGL()
|
||||
endif(BUILD_GUI)
|
||||
SetupSalomeSMESH()
|
||||
SetupBoost()
|
||||
if (BUILD_FEM_NETGEN)
|
||||
find_package(NETGEN)
|
||||
endif(BUILD_FEM_NETGEN)
|
||||
|
||||
# -------------------------------- OpenCasCade --------------------------------
|
||||
|
||||
#first, look for OpenCASCADE Community Edition (OCE)
|
||||
#if OCE is installed in a nonstandard location, add -DOCE_DIR=/path/to/dir/containing/OCEConfig.cmake
|
||||
# when configuring with cmake, i.e. cmake .. -DOCE_DIR=/usr/share/cmake
|
||||
if( NOT DEFINED OCE_DIR )
|
||||
if( UNIX )
|
||||
set( OCE_DIR "/usr/local/share/cmake/" )
|
||||
else()
|
||||
set( OCE_DIR "c:/OCE-0.4.0/share/cmake" )
|
||||
endif()
|
||||
endif()
|
||||
find_package ( OCE )
|
||||
if( ${OCE_FOUND} )
|
||||
message("-- OpenCASCADE Community Edition has been found.")
|
||||
add_definitions ( -DHAVE_CONFIG_H )
|
||||
set( OCC_LIBRARIES "TKFeat;TKFillet;TKMesh;TKernel;TKG2d;TKG3d;TKMath;TKIGES;TKSTL;TKShHealing;TKXSBase;TKBool;TKBO;TKBRep;TKTopAlgo;TKGeomAlgo;TKGeomBase;TKOffset;TKPrim;TKSTEP;TKSTEPBase;TKSTEPAttr;TKHLR" ) #lib list copied from FreeCAD's FindOpenCasCade.cmake
|
||||
set( OCC_OCAF_LIBRARIES "TKCAF;TKXCAF;TKLCAF;TKXDESTEP;TKXDEIGES" ) #lib list copied from FreeCAD's FindOpenCasCade.cmake
|
||||
set( OCC_INCLUDE_DIR ${OCE_INCLUDE_DIRS} )
|
||||
set( OCC_FOUND ${OCE_FOUND} )
|
||||
else() #look for OpenCASCADE
|
||||
find_package(OpenCasCade)
|
||||
IF(NOT OCC_FOUND)
|
||||
MESSAGE("Neither OpenCASCADE Community Edition nor OpenCasCade were found: will not build CAD modules!")
|
||||
ELSE()
|
||||
MESSAGE("-- OpenCASCADE include directory: ${OCC_INCLUDE_PATH}")
|
||||
MESSAGE("-- OpenCASCADE shared libraries directory: ${OCC_LIB_PATH}")
|
||||
ENDIF()
|
||||
endif()
|
||||
|
||||
# -------------------------------- Salome SMESH --------------------------
|
||||
|
||||
# Salome SMESH sources are under src/3rdParty now
|
||||
IF(OCC_FOUND)
|
||||
set(SMESH_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/3rdParty/salomesmesh/inc)
|
||||
set(SMESH_LIBRARIES
|
||||
StdMeshers
|
||||
#MEFISTO2
|
||||
SMESH
|
||||
DriverUNV
|
||||
SMESHDS
|
||||
DriverSTL
|
||||
DriverDAT
|
||||
Driver
|
||||
SMDS
|
||||
)
|
||||
set(SMESH_FOUND TRUE)
|
||||
ENDIF(OCC_FOUND)
|
||||
#find_package(SMESH)
|
||||
#IF(NOT SMESH_FOUND)
|
||||
# MESSAGE("Salome SMESH was not found!")
|
||||
#ENDIF(NOT SMESH_FOUND)
|
||||
|
||||
# -------------------------------- OpenCV --------------------------------
|
||||
|
||||
# not needed at the moment
|
||||
#find_package(OpenCV REQUIRED)
|
||||
SetupSwig()
|
||||
SetupEigen()
|
||||
# This file is included directly due to some cMake macros that are defined within.
|
||||
# If these macro definitions are embedded within another macro, it causes problems.
|
||||
include(cMake/FreeCAD_Helpers/SetupQt.cmake)
|
||||
SetupFreetype()
|
||||
|
||||
if(BUILD_GUI)
|
||||
SetupCoin3D()
|
||||
SetupSpaceball()
|
||||
SetupShibokenAndPyside()
|
||||
SetupMatplotlib()
|
||||
endif(BUILD_GUI)
|
||||
endif(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
|
||||
# -------------------------------- Swig ----------------------------------
|
||||
|
||||
if(BUILD_VR)
|
||||
find_package(Rift)
|
||||
endif(BUILD_VR)
|
||||
find_package(SWIG)
|
||||
|
||||
SetLibraryVersions()
|
||||
SetGlobalCompilerAndLinkerSettings()
|
||||
IF(NOT SWIG_FOUND)
|
||||
MESSAGE("SWIG was not found, build no SWIG binding for pivy")
|
||||
ENDIF(NOT SWIG_FOUND)
|
||||
|
||||
# -------------------------------- Eigen --------------------------------
|
||||
|
||||
#find_package(Eigen2)
|
||||
find_package(Eigen3)
|
||||
|
||||
# -------------------------------- ODE ----------------------------------
|
||||
|
||||
# find_package(ODE)
|
||||
|
||||
# -------------------------------- Qt --------------------------------
|
||||
|
||||
# sets ${QT_LIBRARIES}
|
||||
|
||||
SET(QT_MIN_VERSION 4.5.0)
|
||||
set(QT_USE_QTNETWORK TRUE)
|
||||
set(QT_USE_QTXML TRUE)
|
||||
if(FREECAD_BUILD_GUI)
|
||||
set(QT_USE_QTOPENGL TRUE)
|
||||
set(QT_USE_QTSVG TRUE)
|
||||
set(QT_USE_QTUITOOLS TRUE)
|
||||
set(QT_USE_QTWEBKIT TRUE)
|
||||
endif(FREECAD_BUILD_GUI)
|
||||
find_package(Qt4 REQUIRED)
|
||||
|
||||
include(${QT_USE_FILE})
|
||||
|
||||
IF(NOT QT4_FOUND)
|
||||
MESSAGE("Library qt-4.3 or above is not available, install QT or FreeCAD Gui version will not be built")
|
||||
ENDIF(NOT QT4_FOUND)
|
||||
|
||||
IF(NOT QT_QTWEBKIT_FOUND)
|
||||
MESSAGE("Qt Webkit not found, will not build browser integration!")
|
||||
ENDIF(NOT QT_QTWEBKIT_FOUND)
|
||||
|
||||
|
||||
# This is a special version of the built in macro qt4_wrap_cpp
|
||||
# It is required since moc'ed files are now included instead of being added to projects directly
|
||||
# It adds a reverse dependency to solve this
|
||||
# This has the unfortunate side effect that some files are always rebuilt
|
||||
# There is probably a cleaner solution than this
|
||||
macro(fc_wrap_cpp outfiles )
|
||||
# get include dirs
|
||||
QT4_GET_MOC_FLAGS(moc_flags)
|
||||
QT4_EXTRACT_OPTIONS(moc_files moc_options ${ARGN})
|
||||
# fixes bug 0000585: bug with boost 1.48
|
||||
SET(moc_options ${moc_options} -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
|
||||
|
||||
foreach(it ${moc_files})
|
||||
get_filename_component(it ${it} ABSOLUTE)
|
||||
QT4_MAKE_OUTPUT_FILE(${it} moc_ cpp outfile)
|
||||
QT4_CREATE_MOC_COMMAND(${it} ${outfile} "${moc_flags}" "${moc_options}")
|
||||
set(${outfiles} ${${outfiles}} ${outfile})
|
||||
add_file_dependencies(${it} ${outfile})
|
||||
endforeach(it)
|
||||
endmacro(fc_wrap_cpp)
|
||||
|
||||
if(FREECAD_BUILD_GUI)
|
||||
# -------------------------------- OpenGL --------------------------------
|
||||
|
||||
find_package(OpenGL)
|
||||
include(FindPackageMessage)
|
||||
if(OPENGL_GLU_FOUND)
|
||||
find_package_message(OPENGL_GLU
|
||||
"Found OpenGLU: ${OPENGL_glu_LIBRARY}"
|
||||
"[${OPENGL_glu_LIBRARY}][${OEPNGL_INCLUDE_DIR}]")
|
||||
else(OPENGL_GLU_FOUND)
|
||||
message(FATAL_ERROR "The GLU library is required. Make sure it is installed.")
|
||||
endif(OPENGL_GLU_FOUND)
|
||||
|
||||
# -------------------------------- Coin3D --------------------------------
|
||||
|
||||
find_package(Coin3D REQUIRED)
|
||||
find_package(SoQt REQUIRED)
|
||||
|
||||
# ------------------------------ Spaceball -------------------------------
|
||||
|
||||
if (WIN32)
|
||||
#future
|
||||
else(WIN32)
|
||||
find_package(Spnav)
|
||||
endif(WIN32)
|
||||
|
||||
# ------------------------------ Matplotlib ------------------------------
|
||||
|
||||
find_package(Matplotlib)
|
||||
IF(MATPLOTLIB_FOUND)
|
||||
message("-- matplotlib-${MATPLOTLIB_VERSION} has been found.")
|
||||
ELSE(MATPLOTLIB_FOUND)
|
||||
message("matplotlib not found, Plot module will not available until matplotlib is installed!")
|
||||
ENDIF(MATPLOTLIB_FOUND)
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
|
||||
endif(FREECAD_BUILD_GUI)
|
||||
|
||||
|
||||
endif(FREECAD_LIBPACK_USE)
|
||||
|
||||
# copy build convenient files for M$
|
||||
if(WIN32)
|
||||
if (EXISTS BuildAll.bat)
|
||||
configure_file(BuildAll.bat ${CMAKE_BINARY_DIR}/BuildAll.bat COPYONLY)
|
||||
endif (EXISTS BuildAll.bat)
|
||||
#configure_file(BuildAllNice.bat ${CMAKE_BINARY_DIR}/BuildAllNice.bat COPYONLY)
|
||||
endif(WIN32)
|
||||
|
||||
|
||||
include(cMake/FreeCadMacros.cmake)
|
||||
|
||||
|
||||
# ================================================================================
|
||||
# == Global Compiler and Linker Settings =========================================
|
||||
|
||||
include_directories(${CMAKE_BINARY_DIR}/src
|
||||
${CMAKE_SOURCE_DIR}/src)
|
||||
|
||||
# check for 64-bit platform
|
||||
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
MESSAGE(STATUS "Platform is 64-bit, set -D_OCC64")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_OCC64")
|
||||
add_definitions(-D_OCC64 )
|
||||
ELSE(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
MESSAGE(STATUS "Platform is 32-bit")
|
||||
ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
|
||||
|
||||
|
||||
IF(MSVC)
|
||||
# set default compiler settings
|
||||
#SET (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GF /GY")
|
||||
SET (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DFC_DEBUG")
|
||||
# set default libs
|
||||
SET (CMAKE_C_STANDARD_LIBRARIES "kernel32.lib user32.lib gdi32.lib winspool.lib SHFolder.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib ")
|
||||
set (CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES}")
|
||||
# set linker flag /nodefaultlib
|
||||
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB")
|
||||
SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB")
|
||||
|
||||
# Mark 32 bit executables large address aware so they can use > 2GB address space
|
||||
# NOTE: This setting only has an effect on machines with at least 3GB of RAM, although it sets the linker option it doesn't set the the linker switch 'Enable Large Addresses'
|
||||
IF(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /LARGEADDRESSAWARE")
|
||||
SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
|
||||
ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
ELSE(MSVC)
|
||||
SET (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DFC_DEBUG")
|
||||
MESSAGE(STATUS "DEBUG: ${CMAKE_CXX_FLAGS_DEBUG}")
|
||||
ENDIF(MSVC)
|
||||
IF(MINGW)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mthreads")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mthreads")
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -mthreads -Wl,--export-all-symbols")
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -mthreads -Wl,--export-all-symbols")
|
||||
LINK_LIBRARIES(-lgdi32)
|
||||
ENDIF(MINGW)
|
||||
# 0000661: cmake build on Mac OS: dealing with dylib versus so
|
||||
IF(APPLE)
|
||||
SET(CMAKE_SHARED_LIBRARY_SUFFIX ".so")
|
||||
ENDIF(APPLE)
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(data)
|
||||
|
||||
BuildAndInstallDesignerPlugin()
|
||||
# ================================================================================
|
||||
# == Packaging ===================================================================
|
||||
if(FREECAD_MAINTAINERS_BUILD AND NOT WIN32)
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "An extensible Open Source CAx program")
|
||||
set(CPACK_PACKAGE_VENDOR "FreeCAD development team")
|
||||
if(WIN32)
|
||||
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.Win32")
|
||||
else(WIN32)
|
||||
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.Linux")
|
||||
endif(WIN32)
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/copying.lib")
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR ${PACKAGE_VERSION_MAJOR})
|
||||
set(CPACK_PACKAGE_VERSION_MINOR ${PACKAGE_VERSION_MINOR})
|
||||
set(CPACK_PACKAGE_VERSION_PATCH ${PACKAGE_VERSION_PATCH})
|
||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME ${PACKAGE_NAME}-${PACKAGE_VERSION})
|
||||
|
||||
CreatePackagingTargets()
|
||||
#for debian: 'cmake .. -DFREECAD_MAINTAINERS_BUILD=TRUE -DCPACK_GENERATOR="DEB"'
|
||||
IF( CMAKE_SIZEOF_VOID_P EQUAL 4 )
|
||||
set(PKG_ARCH i386)
|
||||
ELSE( CMAKE_SIZEOF_VOID_P EQUAL 4 )
|
||||
set(PKG_ARCH amd64)
|
||||
ENDIF( CMAKE_SIZEOF_VOID_P EQUAL 4 )
|
||||
set(CPACK_DEBIAN_PACKAGE_SECTION "science")
|
||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "python, oce | opencascade, libqtgui4, libcoin60, libsoqt4-20, libxerces-c3.1, zlib1g, libboost-dev, libeigen2-dev")
|
||||
set(CPACK_PACKAGE_CONTACT "<root@localhost>")
|
||||
set(CPACK_PACKAGE_FILE_NAME "${PACKAGE_NAME}-${PACKAGE_VERSION}_${PKG_ARCH}")
|
||||
|
||||
if(WIN32)
|
||||
set(CPACK_GENERATOR "ZIP")
|
||||
set(CPACK_SOURCE_GENERATOR "ZIP")
|
||||
else(WIN32)
|
||||
if( CPACK_GENERATOR STREQUAL "" )
|
||||
set(CPACK_GENERATOR "TGZ")
|
||||
set(CPACK_SOURCE_GENERATOR "TGZ")
|
||||
endif()
|
||||
endif(WIN32)
|
||||
file(GLOB DOT ".*")
|
||||
file(GLOB TILD "*~")
|
||||
set(CPACK_SOURCE_IGNORE_FILES
|
||||
"${DOT}"
|
||||
"${TILD}"
|
||||
".a$"
|
||||
".am$"
|
||||
".in$"
|
||||
".bat$"
|
||||
".o$"
|
||||
".so$"
|
||||
".m4$"
|
||||
"/_build/"
|
||||
"/_cmake/"
|
||||
"/.deps/"
|
||||
"/.svn/"
|
||||
"/CMakeFiles/"
|
||||
"/CVS/"
|
||||
"/autom4te.cache/"
|
||||
"/build/"
|
||||
"/debian/"
|
||||
"/debug/"
|
||||
"/docs/"
|
||||
"/m4/"
|
||||
"/qt-build/"
|
||||
"/CxImage/"
|
||||
"/WindowsInstaller/"
|
||||
"AdditionalInfo.txt$"
|
||||
"CMakeCache.txt$"
|
||||
"Makefile$"
|
||||
"\\\\.sh$"
|
||||
"_CPack_"
|
||||
"config.h$"
|
||||
"config.log$"
|
||||
"config.status$"
|
||||
"configure$"
|
||||
"configure.ac$"
|
||||
"Doxyfile"
|
||||
"html$"
|
||||
"stamp-h1$"
|
||||
".swp$"
|
||||
"tar.bz2"
|
||||
"tar.gz"
|
||||
"~$"
|
||||
)
|
||||
#set(CPACK_SOURCE_IGNORE_FILES
|
||||
# ${CPACK_SOURCE_IGNORE_FILES}
|
||||
# "/Pivy-0.5/"
|
||||
#)
|
||||
set(CPACK_SOURCE_STRIP_FILES "")
|
||||
include(CPack)
|
||||
|
||||
if(MSVC AND FREECAD_LIBPACK_USE AND LIBPACK_FOUND)
|
||||
CopyLibpackDirectories()
|
||||
endif()
|
||||
#ADD_CUSTOM_TARGET(DIST make package_source)
|
||||
|
||||
if (ENABLE_DEVELOPER_TESTS)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
endif(FREECAD_MAINTAINERS_BUILD AND NOT WIN32)
|
||||
#add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
|
||||
add_custom_target(dist-git
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py
|
||||
--srcdir=${CMAKE_SOURCE_DIR} --bindir=${CMAKE_BINARY_DIR}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
add_custom_target(distdfsg-git
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py
|
||||
--srcdir=${CMAKE_SOURCE_DIR} --bindir=${CMAKE_BINARY_DIR} --dfsg
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR MINGW)
|
||||
add_custom_target(distcheck-git
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py
|
||||
--srcdir=${CMAKE_SOURCE_DIR} --bindir=${CMAKE_BINARY_DIR} --check
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
add_custom_target(distcheckdfsg-git
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py
|
||||
--srcdir=${CMAKE_SOURCE_DIR} --bindir=${CMAKE_BINARY_DIR} --dfsg --check
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX OR MINGW)
|
||||
|
||||
PrintFinalReport()
|
||||
|
||||
message("\n=================================================\n"
|
||||
"Now run 'cmake --build ${CMAKE_BINARY_DIR}' to build ${PROJECT_NAME}\n"
|
||||
"=================================================\n")
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
# FreeCAD Project Code of Conduct
|
||||
|
||||
## Statement
|
||||
|
||||
The FreeCAD Project community covers people from a wide variety of countries,
|
||||
backgrounds and positions. This global diversity is a great strength of the
|
||||
project, but can also lead to communication issues, which may in turn cause
|
||||
unhappiness. To maximise happiness of the project community taken as a whole,
|
||||
all members (whether users, contributors or committers) are expected to abide
|
||||
by the project's code of conduct. At a high level the code can be summarized
|
||||
as *"be excellent to each other"*. Expanding on this:
|
||||
|
||||
* **Be respectful**: disagreements between people are to be expected and are
|
||||
usually the sign of healthy debate and engagement. Disagreements can lead to
|
||||
frustration and even anger for some members. Turning to personal insults,
|
||||
intimidation or threatening behaviour does not improve the situation though.
|
||||
Participants should thus take care to ensure all communications /
|
||||
interactions stay professional at all times.
|
||||
|
||||
* **Be considerate**: remember that the community has members with a diverse
|
||||
background many of whom have English as a second language. What might appear
|
||||
impolite, may simply be a result of a lack of knowledge of the English
|
||||
language. Bear in mind that actions will have an impact on other community
|
||||
members and the project as a whole, so take potential consequences into
|
||||
account before pursuing a course of action.
|
||||
|
||||
* **Be forgiving**: humans are fallible and as such prone to make mistakes and
|
||||
inexplicably change their positions at times. Don't assume that other members
|
||||
are acting with malicious intent. Be prepared to forgive people who make
|
||||
mistakes and assist each other in learning from them. Playing a blame game
|
||||
doesn't help anyone.
|
||||
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers 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, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. Examples of
|
||||
representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event. Representation of a project may be
|
||||
further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting any of the community admins or moderators at
|
||||
https://forum.freecad.org/memberlist.php?mode=team . All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||
and the [libvirt Code of Conduct][libvirtcoc], available at https://libvirt.org/governance.html.
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
[libvirtcoc]: https://libvirt.org/governance.html
|
||||
|
||||
For answers to common questions about the Contributor Covenant, see
|
||||
https://www.contributor-covenant.org/faq
|
||||
-100
@@ -1,100 +0,0 @@
|
||||
# FreeCAD Contribution Process (FCP)
|
||||
|
||||
FreeCAD's contribution process is inspired by the Collective Code Construction Contract which itself is an evolution of the github.com Fork and Pull Model.
|
||||
|
||||
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.
|
||||
|
||||
|
||||
## 0. Status
|
||||
|
||||
FreeCAD is in a transition period. The following are to be regarded as GUIDELINES for contribution submission and acceptance. For historical reasons, the actual process MAY diverge from this process during the transition. Such deviations SHOULD be noted and discussed whenever possible.
|
||||
|
||||
## 1. Goals
|
||||
|
||||
The FreeCAD Contribution Process is expressed here with the following specific goals in mind:
|
||||
|
||||
1. To provide transparency and fairness in the contribution process.
|
||||
2. To allow contributions to be included as quickly as possible.
|
||||
3. To preserve and improve the code quality while encouraging appropriate experimentation and risk-taking.
|
||||
4. To minimize dependence on individual Contributors by encouraging a large pool of active Contributors.
|
||||
5. To be inclusive of many viewpoints and to harness a diverse set of skills.
|
||||
6. To provide an encouraging environment where Contributors learn and improve their skills.
|
||||
7. To protect the free and open nature of the FreeCAD project.
|
||||
|
||||
## 2. Fundamentals
|
||||
|
||||
1. FreeCAD uses the git distributed revision control system.
|
||||
2. Source code for the main application and related subprojects is hosted on github.com in the FreeCAD organization.
|
||||
3. Problems are discrete, well-defined limitations or bugs.
|
||||
4. FreeCAD uses GitHub's issue-tracking system to track problems and contributions. For help requests and general discussions, use the project forum.
|
||||
5. Contributions are sets of code changes that resolve a single problem.
|
||||
6. FreeCAD uses the Pull Request workflow for evaluating and accepting contributions.
|
||||
|
||||
## 3. Roles
|
||||
1. "User": A member of the wider FreeCAD community who uses the software.
|
||||
2. "Contributor": A person who submits a contribution that resolves a previously identified problem. Contributors do not have commit access to the repository unless they are also Maintainers. Everyone, without distinction or discrimination, SHALL have an equal right to become a Contributor.
|
||||
3. "Maintainer": A person who merges contributions. Maintainers may or may not be Contributors. Their role is to enforce the process. Maintainers have commit access to the repository.
|
||||
4. "Administrator": Administrators have additional authority to maintain the list of designated Maintainers.
|
||||
|
||||
## 4. Licensing, Ownership, and Credit
|
||||
1. FreeCAD is distributed under the Lesser General Public License, version 2, or superior (LGPL2+). Additional details can be found in the LICENSE file.
|
||||
2. All contributions to FreeCAD MUST use a compatible license.
|
||||
3. All contributions are owned by their authors unless assigned to another.
|
||||
4. FreeCAD does not have a mandatory copyright assignment policy.
|
||||
5. A Contributor who wishes to be identified in the Credits section of the application "About" dialog is responsible for identifying themselves. They should modify the Contributors file and submit a PR with a single commit for this modification only. The contributors file is found at https://github.com/FreeCAD/FreeCAD/blob/master/src/Doc/CONTRIBUTORS
|
||||
6. A contributor who does not wish to assume the copyright of their contribution MAY choose to assign it to the [FreeCAD project association](https://fpa.freecad.org) by mentioning **Copyright (c) 2022 The FreeCAD project association <fpa@freecad.org>** in the file's license code block.
|
||||
|
||||
## 5. Contribution Requirements
|
||||
|
||||
1. Contributions are submitted in the form of Pull Requests (PR).
|
||||
2. Maintainers and Contributors MUST have a GitHub account and SHOULD use their real names or a well-known alias.
|
||||
3. If the GitHub username differs from the username on the FreeCAD Forum, effort SHOULD be taken to avoid confusion.
|
||||
4. A PR SHOULD be a minimal and accurate answer to exactly one identified and agreed-on problem.
|
||||
5. A PR SHOULD refrain from adding additional dependencies to the FreeCAD project unless no other option is available.
|
||||
6. Code submissions MUST adhere to the code style guidelines of the project if these are defined.
|
||||
7. If a PR contains multiple commits, each commit MUST compile cleanly when merged with all previous commits of the same PR. Each commit SHOULD add value to the history of the project. Checkpoint commits SHOULD be squashed.
|
||||
8. A PR SHALL NOT include non-trivial code from other projects unless the Contributor is the original author of that code.
|
||||
9. A PR MUST compile cleanly and pass project self-tests on all target platforms.
|
||||
10. Each commit message in a PR MUST succinctly explain what the commit achieves. The commit message SHALL follow the suggestions in the `git commit --help` documentation, section DISCUSSION.
|
||||
11. The PR message MUST consist of a single short line, the PR Title, summarizing the problem being solved, followed by a blank line and then the proposed solution in the Body. If a PR consists of more than one commit, the PR Title MUST succinctly explain what the PR achieves. The Body MAY be as detailed as needed.
|
||||
12. A “Valid PR” is one which satisfies the above requirements.
|
||||
|
||||
## 6. Process
|
||||
|
||||
1. Change on the project follows the pattern of accurately identifying problems and applying minimal, accurate solutions to these problems.
|
||||
2. To request changes, a User logs an issue on the project GitHub issue tracker.
|
||||
3. The User or Contributor SHOULD write the issue by describing the problem they face or observe. Links to the forum or other resources are permitted but the issue SHOULD be complete and accurate and SHOULD NOT require the reader to visit the forum or any other platform to understand what is being described.
|
||||
4. Issue authors SHOULD strive to describe the minimum acceptable condition.
|
||||
5. Issue authors SHOULD focus on User tasks and avoid comparisons to other software solutions.
|
||||
6. The User or Contributor SHOULD seek consensus on the accuracy of their observation and the value of solving the problem.
|
||||
7. To submit a solution to a problem, a Contributor SHALL create a pull request back to the project.
|
||||
8. Contributors and Maintainers SHALL NOT commit changes directly to the target branch.
|
||||
9. To discuss a proposed solution, Users MAY comment on the Pull Request in GitHub. Forum conversations regarding the solution SHOULD be discouraged and conversation redirected to the Pull Request or the related issue.
|
||||
10. To accept or reject a Pull Request, a Maintainer SHALL use GitHub's interface.
|
||||
11. Maintainers SHOULD NOT merge their own PRs except:
|
||||
1. in exceptional cases, such as non-responsiveness from other Maintainers for an extended period.
|
||||
2. If the Maintainer is also the primary developer of the workbench or subsystem.
|
||||
|
||||
12. Maintainers SHALL merge valid PRs from other Contributors rapidly.
|
||||
13. Maintainers MAY, at their discretion merge PRs that have not met all criteria to be considered valid to:
|
||||
1. end fruitless discussions
|
||||
2. capture toxic contributions in the historical record
|
||||
3. engage with the Contributor on improving their contribution quality.
|
||||
14. Maintainers SHALL NOT make value judgments on correct contributions.
|
||||
15. Any Contributor who has value judgments on a PR SHOULD express these via their own PR.
|
||||
16. The User who created an issue SHOULD close the issue after checking the PR is successful.
|
||||
17. Maintainers SHOULD close issues that are left open without action or update for an unreasonable period.
|
||||
|
||||
## 7. Branches and Releases
|
||||
|
||||
1. The project SHALL have one branch (“master”) that always holds the latest in-progress version and SHOULD always build.
|
||||
2. The project SHALL NOT use topic branches for any reason. Personal forks MAY use topic branches.
|
||||
3. To make a stable release a Maintainer SHALL tag the repository. Stable releases SHALL always be released from the repository master.
|
||||
|
||||
## 8. Project Administration
|
||||
|
||||
1. The project Administrators will manage the set of project Maintainers. They SHALL maintain a sufficiently large pool of Maintainers to ensure their succession and permit timely review of contributions.
|
||||
2. Contributors who have a history of successful PRs and have demonstrated continued professionalism should be invited to be Maintainers.
|
||||
3. Administrators SHOULD remove Maintainers who are inactive for an extended period, or who repeatedly fail to apply this process accurately.
|
||||
4. The list of Maintainers SHALL be publicly accessible and reflective of current activity on the project.
|
||||
5. Administrators SHOULD block or ban “bad actors” who cause stress, animosity, or confusion to others in the project. This SHOULD be done after public discussion, with a chance for all parties to speak. A bad actor is someone who repeatedly ignores the rules and culture of the project, who is hostile or offensive, who impedes the productive exchange of information, and who is unable to self-correct their behavior when asked to do so by others.
|
||||
+914
@@ -0,0 +1,914 @@
|
||||
Changelog you finde now here:
|
||||
https://sourceforge.net/apps/mantisbt/free-cad/changelog_page.php
|
||||
|
||||
Version: 0.12
|
||||
*
|
||||
|
||||
Version:
|
||||
* Sketcher module added with constraint solver using SketchFlat
|
||||
* Add Draft module to installer
|
||||
* Fix many Python reference counting errors
|
||||
* Implement edit mode for meshes and shapes
|
||||
* Property editor for placements added
|
||||
* Implement Python's number protocol for MatrixPy and VectorPy
|
||||
* Implement import/export framework
|
||||
* Workaround for offscreen renderer due to a huge memory leak in Coin 2.4.x
|
||||
* Support of Qt 4.1.4 in Draft module
|
||||
* Porting sources to Mac OS X Leopard
|
||||
* Implement a progress indicator to run with OCC algorithm classes
|
||||
* Binding for SWIG-generated pythonocc added
|
||||
|
||||
Version: 0.7.1779 Date: Sun 14 Dec 2008 +++++++++++++++++++++++++++++
|
||||
* Implementation of uuid
|
||||
* Support of transient directories for FreeCAD documents
|
||||
* Basic support to create SVG files from scenegraph
|
||||
* Python binding finished for all shape and geometry classes in Part module
|
||||
* Move to PyCXX 5.4.2
|
||||
* Class Writer can now insert ascii or bin data in xml stream
|
||||
* Start porting to OpenCascade 6.3
|
||||
* Use Tango icon set
|
||||
|
||||
Version: 0.7.1672 Date: Sat 25 Oct 2008 +++++++++++++++++++++++++++++
|
||||
* Update of Windows installer
|
||||
|
||||
Version: 0.7.1658 Date: Sat 11 Oct 2008 +++++++++++++++++++++++++++++
|
||||
* Fix many license issues
|
||||
* Define QT_NO_CAST_FROM_ASCII to avoid problems with UTF-8 encoded strings
|
||||
* Support additional module paths in home directory
|
||||
* Re-implement the "What's this" facility to start the help window with context-sensitive help
|
||||
* Create Python commands from the user input in the property editor
|
||||
* Support of groups in property editor
|
||||
* Implement general export framework
|
||||
* Implement graphical user-interface for creation of fillets and extrusions
|
||||
* Add scene inspector for analyzing the OpenInventor scene graph
|
||||
* Rework online help, prepared for new framework in Qt4.4
|
||||
|
||||
Version: 0.7.1514 Date: Sun 03 Aug 2008 +++++++++++++++++++++++++++++
|
||||
* Add more stuff to the copyright file
|
||||
* control: add build-dep to python-central
|
||||
* Abstract interface for geometric data types
|
||||
* Avoid flickering of cursor when cutting several meshes at once
|
||||
* Update to the latest debian policy version 3.7.3
|
||||
* Several bugs fixed with Python GIL
|
||||
* Make TopoDS_Shape and Geom_Geometry classes accessible from Python
|
||||
* Make Python interface for algorithms on shapes and geometries
|
||||
* Support of mesh segments
|
||||
* Add test/annotation object
|
||||
* Add simple measurement facility
|
||||
* Remove OpenCascade dependency in Mesh module
|
||||
* Thumbnail facility added
|
||||
* Start cMake support
|
||||
* Compile with boost 1.35
|
||||
|
||||
Version: 0.7.1344 Date: Wed 21 May 2008 +++++++++++++++++++++++++++++
|
||||
* Write patch file to make builds with OpenCASCADE libs inside but with no
|
||||
dependency to libopencascade6.2
|
||||
* New debian package for Feisty
|
||||
* New package with fixed self-dependency problem
|
||||
* Embed required OpenCASCADE libs into this package as long as no official
|
||||
Debian package is available
|
||||
|
||||
Version: 0.7.1342 Date: Mon 19 May 2008 +++++++++++++++++++++++++++++
|
||||
* Switch to new versioning scheme of OpenCASCADE packages
|
||||
* Re-license all FreeCAD source code to LGPL
|
||||
|
||||
Version: 0.7.1316 Date: Sat 26 Apr 2008 +++++++++++++++++++++++++++++
|
||||
* Support of pivy (Python binding for Coin/SoQt)
|
||||
* Support of PyQt4
|
||||
* General support of SWIG modules
|
||||
* Cleanup code and fix of several race conditions or insecure code (flawfinder)
|
||||
* UTF-8 support
|
||||
* Optimize mesh evaluation/validation classes to be faster and using less memory
|
||||
* Include Pivy -- the Python binding for Coin
|
||||
|
||||
Version: 0.7.1031 Date: Fri 04 Jan 2008 +++++++++++++++++++++++++++++
|
||||
* Qt4 port finished
|
||||
* Support of Python binding for Qt4
|
||||
* Support of Python binding for Coin
|
||||
* Support of entirely in Python written modules
|
||||
* Added support of model driven architecture for Python binding
|
||||
* Use boost's signal/slot mechanism to update data
|
||||
|
||||
Version: 0.6.645 Date: Tue 24 Jul 2007 ++++++++++++++++++++++++++++++
|
||||
* Qt4 port started
|
||||
|
||||
Version: 0.6.476 Date: Tue 27 Feb 2007 ++++++++++++++++++++++++++++++
|
||||
* Use revision number in version naming scheme
|
||||
* Initial Release of Debian/Ubuntu package
|
||||
|
||||
Version: 0.5.285 Date: Thu 05 Oct 2006 ++++++++++++++++++++++++++++++
|
||||
* Use revision number in version naming scheme
|
||||
* Initial Release of Debian/Ubuntu package
|
||||
* Optimizations for huge meshes implemented
|
||||
* Export VRML97 from scenegraph
|
||||
* Export mesh as compressed VRML
|
||||
* have only one color bar per scene
|
||||
* group classes supporting various mesh formats to two classes: MeshOutput and MeshInput
|
||||
|
||||
Version: V0.5B8 Date: Tue Aug 01 2006 +++++++++++++++++++++++++++++++
|
||||
* Write FreeCAD.log to AppData folder
|
||||
* Use 'HOME' for Linux and 'HOMEDRIVE' for Windows only
|
||||
* new type FCUInt introduced
|
||||
* use same compressed color values as Coin3d
|
||||
* Remove PYTHONPATH stuff
|
||||
* port to OpenCascade 6.1
|
||||
* Switch the installer to python23.zip type lib
|
||||
* PropertyFile added and editor implemented
|
||||
* Check whether a project file is already open and throw an exception
|
||||
* Allow to open a project file even if not everything can be loaded e.g. if a module is missing
|
||||
* Select name if a file instead of directory was given in FileDialog's getOpenFileName() or getSaveFileName() methods
|
||||
* Bug fixed in harmonizing normals of a mesh
|
||||
* speed up a lot several algorithms that searches for independant components of a mesh or searches for inhomogenous normals
|
||||
* make MeshKernel::VisitNeighbourFacets() more robust against topologic errors in mesh
|
||||
* Option added to do one- or two-side rendering of meshes
|
||||
* Dialog to enter numbers higher than the maximum of int's, i.e numbers up to 4294967295
|
||||
* Bug 1449428 (Crash when output to console too long) fixed by replacing vsprintf by vsnprint
|
||||
* Bug 1558658 (A hidden view with a spinning part consumes CPU-Time) fixed
|
||||
* Bug 1558622 (Version.h is not generated with a normal build) fixed
|
||||
* Patches 1559380, 1559154 applied
|
||||
* Bug 1564726 fixed (Does not compile with GCC 4.1.1)
|
||||
* Bug 1566863 fixed (Float Property is has limited range [0..12])
|
||||
* RFE 1566398 impl. (Property editor for App::PropertyEnumeration)
|
||||
|
||||
Version: V0.5B7 Date: Thu May 18 2006 +++++++++++++++++++++++++++++++
|
||||
* move to SVN version control
|
||||
* added spins to edit line width and point size in display dialog
|
||||
* Optimized SoFCMeshNode for handling of huge meshes
|
||||
* Prepend SoCallback node to log all traversing actions (only for debugging)
|
||||
* command for toggling clipping plane
|
||||
* command for freezing view positions
|
||||
* added new ViewProvider for meshes with more than 100.000 triangles using SoFCMeshNode for optimizations
|
||||
* save/restore of view providers into/from a separate XML file in a project file
|
||||
* check if project file exists when loading from command line
|
||||
* using grid to speed up cutting algoritm for huge meshes
|
||||
* calculate inverse color of mesh color for open edges
|
||||
* added project properties to App::Document
|
||||
* added material property class
|
||||
* allow to disable notification of property container when a property has changed its value
|
||||
* added dialog to show and set project information
|
||||
* start moving display relevant properties from DocumentObject (data) classes to the associated ViewProvider (view) classes
|
||||
* reimplemented dialogs DlgDisplayPropertiesImp and DlgMaterialPropertiesImp
|
||||
* added ViewProvider class for Python
|
||||
* separate data and view properties and show in different tabs in the editor
|
||||
* new methods added to Gui::DocumentPy to get active object and object by name
|
||||
* add only required Inventor nodes to all ViewProvider subclasses and removed from ViewProviderDocumentObject
|
||||
* use an additional STL vector to preserve the creation order of objects
|
||||
* added a group class for document objects and its view provider
|
||||
* added PropertyPartShape to save/load shapes to/from a document
|
||||
* rename document member in SoFCSelection after a document has been renamed
|
||||
* Prepared for OCC 6.1: The modules 'AppMesh', 'AppPartGui', 'AppRaytracing' and 'AppRaytracingGui' need the module 'TKMesh.lib'
|
||||
* Added a method to XMLReader to get unsigned long from a string
|
||||
* Make several methods of BaseView const
|
||||
* Bug fixed in TreeView
|
||||
* Added new action classes for en/disabling selection and highlighting with their colors
|
||||
* Bug fixed when opening a project with the same file name
|
||||
* RFE 1450472 Clear selection of active document only
|
||||
* SoFCMeshOpenEdge shape node added to render the open edges of a mesh
|
||||
* print some information in Attach() and Detach() in Observer in debug mode
|
||||
* delete command objects when application is exiting
|
||||
* bug fixed in 'Refresh' command
|
||||
* active view stuff fixed
|
||||
* proper handling of double clicks with wheel button
|
||||
* Random color implemented
|
||||
* Box zoom implementation started
|
||||
|
||||
=====================================================================
|
||||
MOVE TO SUBVERSION
|
||||
=====================================================================
|
||||
|
||||
Version: V0.5B6 Date: Sat Apr 15 2006 +++++++++++++++++++++++++++++++
|
||||
* renamed Vector3D to Vector3f indicating the precision of float and Vector3d as double respectively
|
||||
* updated the unittests in Test framework using new API
|
||||
* Added some experimental properties to mesh viewprovider
|
||||
* Allow to build up structured menus from within Python
|
||||
* StdWorkbench::setupContextMenu() implemented
|
||||
* PropertyStringList added
|
||||
* Continued implementation of property editor
|
||||
* Nullify reference to deleted object of dependent objects (Document::remObject)
|
||||
* Check if the reference is valid in Mesh::Feature::getMesh() and subclasses
|
||||
* Several bugs in Raytracing module fixed
|
||||
* API changes in DocumentPy:
|
||||
- Recompute -> recompute
|
||||
- activeFeature -> activeDocument
|
||||
- addFeature -> addObject
|
||||
- getFeature -> getObject
|
||||
- removeFeature -> removeObject
|
||||
- listFeatures -> listObjects
|
||||
- AddFeature removed
|
||||
- GetFeature removed
|
||||
- GetActiveFeature -> getActiveObject
|
||||
* API changes in Property
|
||||
- Save(Writer&) -> Save(Writer) const
|
||||
* API changes in ViewProviderDocumentObject
|
||||
- attach(App::AbstractFeature*) -> attach(App::DocumentObject*)
|
||||
* Applied patch 1470733, SetOperation patch
|
||||
* Applied patch 1470737, new module tritritest
|
||||
* Fixed bug in ViewProviderDocumentObject::ViewProviderDocumentObject(): pcPointStyle->ref()
|
||||
* Check for scheme version when loading a project file and handle the reading procedure differently
|
||||
* RFE 1470745 implemented (material mode: Open Edges)
|
||||
* show also members of DocumentObjects in Python (implemented in DocumentObjectPy::_getattr)
|
||||
* show members in MaterialPy, DocumentPy and FeaturePy
|
||||
* Fixed bugs with C++/Python framework
|
||||
(NOTE: All C++ classes returning an associated Python object with a reference to itself must NOT return always a new instances
|
||||
for each call but it must return the same instance, otherwise the Python objects cannot be notified when the C++ object
|
||||
has been destroyed)
|
||||
* Allow drag'n'drop for files coming from ZIP files
|
||||
* More intuitive handling of property editor
|
||||
|
||||
Version: V0.5B5 Date: Sat Feb 25 2006 +++++++++++++++++++++++++++++++
|
||||
* Make use of AC_LIBTOOL_DLOPEN macro for Unix/Linux based systems to allow to create modules.
|
||||
* Create a loader module (without 'lib' prefix ) for each shared library (with 'lib' prefix)
|
||||
* The dirty hack to create symlinks during installation has been removed.
|
||||
* Builder3D Visual debugging facility
|
||||
* set default tabwidth in editor to 4 char, can be changed in user settings
|
||||
* block comment/uncomment implemented
|
||||
* Undo/Redo of block comment or uncomment implemented
|
||||
* Bug in DocItem class fixed: allow only one item with the same name
|
||||
* set the dirty flag after Gui::Document has been changed, remove after saving the document
|
||||
* WildMagic dllexport define (patch 1441148)
|
||||
* fix assert if missing feature (patch 1441146)
|
||||
* new modules (patches 1441103, 1441082)
|
||||
* Fixes for new modules (patch 1441145)
|
||||
* Specify orthographic or perspective camera in user settings
|
||||
* Ignore built files in Python script for creation of modules
|
||||
* Fixing Bug 1442521,
|
||||
* turn backface culling on/off (RFE 1443940). Seems to work properly with convex geometries only
|
||||
* Enabled two-side rendering for meshes in case it is not a solid
|
||||
* Return the edge list by reference in mesh kernel (to avoid memory leak)
|
||||
* PropertyVectorList implemented
|
||||
* Use PropertyVectorLists and PropertyFloatLists in Mesh::Curvature feature and its associated view provider
|
||||
* PropertyColor(List) implemeted
|
||||
* PropertyMeshKernel added
|
||||
* move all Projects to NODEFAULTLIBS
|
||||
* move all Projects to xcopy
|
||||
* start implementing the link between FreeCAD property and property editor
|
||||
* New methods in Builder3D (patch 1450695,1451028)
|
||||
* Set operations (patch 1451026, 1451138, 1451141)
|
||||
* start const Mesh and MeshProperty
|
||||
* implement class to evaluate and validate meshes with corresponding feature classes
|
||||
* dialog added to analyze and repair meshes
|
||||
* special view providers to display defects of meshes
|
||||
* delete features from the document
|
||||
* bug fixed: remove features to be deleted from the selection
|
||||
* bugs fixed in selection node
|
||||
* restore original document file name after loading a project file
|
||||
* start implementing an Inventor node rendering the mesh structure directly
|
||||
|
||||
Version: V0.5B4 Date: Sat Feb 04 2006 +++++++++++++++++++++++++++++++
|
||||
* use type system in selection class
|
||||
* replace DataStream classes by i/ostream classes
|
||||
* start standardization of API of exported Python classes
|
||||
* implement standard factory in Base::Type
|
||||
* remove Feature and ViewProvider Factory, use Standard
|
||||
* using update instead of recompute after loading document
|
||||
* using c++ name in addFeature()
|
||||
* updating the installer files
|
||||
* fixing the build Dist scripts
|
||||
* implementing Comment for Save picture
|
||||
* implement MIBA
|
||||
* use type system in workbench classes
|
||||
* VC8 Port
|
||||
* Property Pre Callback
|
||||
* Property Lists started
|
||||
* FeatureTest
|
||||
* Run script from editor
|
||||
|
||||
Version: V0.5B3 Date: Mon Jan 30 2006 +++++++++++++++++++++++++++++++
|
||||
* use the zipios++ library for reading from/writing into compressed archives
|
||||
* update zipios++ sources to current CVS version
|
||||
* mesh creation with less memory usag (patch from bgrupp)
|
||||
* a fast algorithm to count edges (2 manifold) without additional memory (patch from bgrupp)
|
||||
* resolve problems for running macros from file with Microsoft Visual Studio 8.0 (patch from bgrupp)
|
||||
* I/O of points and meshes in document container file
|
||||
* fixes memory exception in view provider for meshes
|
||||
* fixes memory exception when rendering an Inventor node with huge amount of data
|
||||
* more efficient loading of huge meshes
|
||||
|
||||
Version: V0.5B2 Date: Sun Jan 15 2006 +++++++++++++++++++++++++++++++
|
||||
* implementing Mesh save and restore
|
||||
* implementing Points save and restore
|
||||
* Save/Open of compressed XML documents
|
||||
* Preference page for document
|
||||
* Setting of document compression level
|
||||
* set _STLP_USE_NEWALLOC to free memory allocated in associative containers
|
||||
* implement Open/Save/SaveAs for use from Python
|
||||
|
||||
Version: V0.5B1 Date: Jan 15 2006 +++++++++++++++++++++++++++++++
|
||||
* changes due Version in Installer
|
||||
|
||||
Version: V0.3B5 Date: Wed Nov 30 15:56:28 2005 +++++++++++++++++++++++++++++++
|
||||
* redesign of Command framework finished
|
||||
* download URL adjusted
|
||||
* allow to download documentation from SourceForge into another directory
|
||||
* store user settings under .FreeCAD on Linux platforms
|
||||
* languageChange f?r CommandGroup and its items
|
||||
* connect and implement Viewer Preferences and updates
|
||||
* fixing Display Dialog
|
||||
* increment reference count of root element before adding to the scenegraph (fixes also the bug with IV examples)
|
||||
and decrement counter when viewer gets destructed
|
||||
* bug fixed in destruction of viewer
|
||||
* moved code from SoFCSelectionAction::callDoAction() to SoFCSelection::doAction() as the selection object must decide what to do, not the action
|
||||
* Implementing save document (partially)
|
||||
|
||||
Version: V0.3B1 Date: Thu Aug 11 06:20:13 2005 +++++++++++++++++++++++++++++++
|
||||
* Begin Workbench framework redesign
|
||||
* BUG 1216922 fixed (Bug with active document)
|
||||
|
||||
Version: V0.1B120 Date: Tue Jul 26 17:09:13 2005 +++++++++++++++++++++++++++++++
|
||||
* Move import shapes from Import to Part
|
||||
* Reworking Feature Property handling
|
||||
* Implementing Feature Linking
|
||||
* Add Naming to Features (AddFeature() needs now a Type and a Name
|
||||
* Moving Vector3D and Matrix4D in Base::
|
||||
* Moving DataWithProperty in Base::
|
||||
* Reworking Points
|
||||
* Points load Ascii
|
||||
* CurveNet Feature in Part
|
||||
* Bug 1242877 fixed (Reference counting)
|
||||
|
||||
Version: V0.1B119 Date: Wed Jun 29 12:57:43 2005 +++++++++++++++++++++++++++++++
|
||||
* reworking recalculation of the document
|
||||
* implementing Feature viewing modes and material
|
||||
- Python binding for that all
|
||||
* ViewProvider framework in Inventor viewer
|
||||
* remove CasCade Viewer
|
||||
* Interpreter::runString returns now a value
|
||||
* Improving mouse interaktions
|
||||
- fix and enable Spin rotation
|
||||
- implement panTo middle mouse double click
|
||||
* implementing selection
|
||||
* using "right" transparency mode
|
||||
* RFE 1187174 implemented (Calling "print" for internal Python objects)
|
||||
* Several improvements:
|
||||
- Command Std_ViewFullScreen switched to toggle command
|
||||
- Use ESC or F to leave fullscreen mode (hard coded in MDIView)
|
||||
- Ignore ContextEvents and accelerators while the progress bar is working
|
||||
- Use double prescision for double in parameter editor
|
||||
- Consider fullscreen windows in ApplicationWindow::activeView()
|
||||
* Initial impl. of a simple color legend
|
||||
* Show progressbar not from beginning but after a few seconds
|
||||
* Using own event loop (QDialog not exception-safe)
|
||||
* RFE 1149709 Missing waitcursor implemented (using Sequencer therefore)
|
||||
* RFE 1211364 Clean up when closing App (using Python's Py_AtExit and Py_Finalize)
|
||||
* BUG 1232848 Recursion in IsKind()
|
||||
|
||||
Version: V0.1B118 Date: Tue Jun 07 15:32:43 2005 +++++++++++++++++++++++++++++++
|
||||
* Bug 1165895 fixed (Bug in closing document)
|
||||
* RFE 1223968 implemented (Pasting scripts in the python console)
|
||||
* Bug 1224686 Action.h: command not found error during linux make
|
||||
Check for QT_UIC and QT_MOC again after the Qt test
|
||||
|
||||
Version: V0.1B117 Date: Sun Mar 20 14:06:55 2005 +++++++++++++++++++++++++++++++
|
||||
* Mesh data structure added to Mesh module
|
||||
* Feature import for STL files added
|
||||
* Viewprovider for meshes added
|
||||
* Integration of latest Image module source
|
||||
* RFE 1159671 implemented (elements in alphabetic order)
|
||||
* Finishing drag&drop multible files
|
||||
* Finishing open from command line and droping on Programm icon
|
||||
* solving load dependand modules
|
||||
* more convenient Python console
|
||||
* Bug 1149706 fixed (Cannot load CAD curves)
|
||||
* RFE 1214187 implemented (Remove views from main window)
|
||||
|
||||
Version: V0.1B116 Date: Wed Mar 16 23:19:23 2005 +++++++++++++++++++++++++++++++
|
||||
* dummy build
|
||||
|
||||
Version: V0.1B115 Date: Sun Feb 27 22:01:44 2005 +++++++++++++++++++++++++++++++
|
||||
* dummy build
|
||||
|
||||
Version: V0.1B114 Date: Sun Feb 13 17:07:39 2005 +++++++++++++++++++++++++++++++
|
||||
* Encapsulation of 'wget' in NetworkRetriever
|
||||
* RFE 1100311 Message if wget cannot be found
|
||||
* Bug 1124689 fixed (Problems when all MDI windows closed)
|
||||
* Heavy bug in View3DInventorEx fixed
|
||||
* Check default parameter in FCParameterGrp::GetASCII() and use "" if it is 0
|
||||
* enhanced NetworkRetriever
|
||||
* loading/saving of user defined macros
|
||||
* Logging into file is working under Linux now
|
||||
* RFE 1149922 implemented (Autoscrolling at startup)
|
||||
|
||||
Version: V0.1B113 Date: Fri Feb 11 00:47:38 2005 +++++++++++++++++++++++++++++++
|
||||
* realize code guidelines in Gui
|
||||
* Patch 1119485 inserted
|
||||
* Method to class Tools added to convert between SbSFImage and QImage
|
||||
|
||||
Version: V0.1B112 Date: Mon Jan 31 01:57:33 2005 +++++++++++++++++++++++++++++++
|
||||
* redesign of PrefWidgets
|
||||
|
||||
Version: V0.1B111 Date: Sun Jan 30 19:02:55 2005 +++++++++++++++++++++++++++++++
|
||||
* reactivate Inventor viewer
|
||||
* build in examples
|
||||
* new view commands
|
||||
|
||||
Version: V0.1B110 Date: Fri Jan 28 16:38:29 2005 +++++++++++++++++++++++++++++++
|
||||
* fix 1110577
|
||||
* finish macro module switching
|
||||
|
||||
Version: V0.1B109 Date: Mon Jan 24 11:13:15 2005 +++++++++++++++++++++++++++++++
|
||||
* plugin containing FreeCAD's specific widgets
|
||||
Note: You have to build the sources under src/Tools/plugins/widgets and
|
||||
copy the library to $QTDIR/plugins/designer to make use of them
|
||||
* Changing logging
|
||||
- -l option switch the file log on
|
||||
- -lf to a special file
|
||||
- SetStatus and GetStatus switch on or off the observer
|
||||
|
||||
Version: V0.1B108 Date: Sat Jan 15 14:24:52 2005 +++++++++++++++++++++++++++++++
|
||||
* Moved HtmlView to HelpView * Reimplementaion
|
||||
* Added class FileChooser ( line edit with button on its right side to browse)
|
||||
* Merged pref. page "Help viewer" and "Online Help" to one page
|
||||
* TextEdit class with completion
|
||||
|
||||
Version: V0.1B107 Date: Tue Jan 11 11:16:46 2005 +++++++++++++++++++++++++++++++
|
||||
* put Application and Document (and helper classes) in namespace App
|
||||
* put exception handling into ParameterPy wrapper
|
||||
* PIMPLE document in class and py class
|
||||
* put the whole document python methodes with the macros and exceptions
|
||||
* removing doctype and put Feature handling into the document
|
||||
* Bug 1100780 fixed (no color in editor after first start)
|
||||
|
||||
Version: V0.1B106 Date: Mon Jan 10 11:16:24 2005 +++++++++++++++++++++++++++++++
|
||||
* fixed Bug 1099103 by fixing HasGroup in ParameterPy
|
||||
|
||||
Version: V0.1B105 Date: Mon Jan 03 16:06:30 2005 +++++++++++++++++++++++++++++++
|
||||
* RFE 1076842 implemented (overlong MDi tabs)
|
||||
* Bug 1076836 fixed (Focus problem with MDI)
|
||||
* Redesign of PrefWidget & WindowParameter
|
||||
* ProgressBar shows remaining time
|
||||
* Bug fixed in removing groups from parameters
|
||||
* Update Commands tab in Customize dialog after creating any macro commands
|
||||
* Allow to modify existing macro commands
|
||||
* FileIconProvider class improved
|
||||
* PyResource class improved
|
||||
* updated README.Linux
|
||||
* clear out Action.cpp/h
|
||||
* use QCString instead of QString for all prefPath and prefEntry properties. This is because of i18n
|
||||
* Translator class added
|
||||
* .ts files updated
|
||||
* Change language on the fly
|
||||
|
||||
Version: V0.1B104 Date: Tue Dec 21 22:15:28 2004 +++++++++++++++++++++++++++++++
|
||||
* Bug 1078371 fixed (crash of property editor)
|
||||
|
||||
Version: V0.1B103 Date: Wed Dec 08 14:33:04 2004 +++++++++++++++++++++++++++++++
|
||||
* RFE 1080561 (keeping standard toolbars) implemented
|
||||
* RFE 1080558 (Return in Macro Dialog) implemented
|
||||
* RFE 1078375 (Report view enhancement) implemented
|
||||
* Import of STEP and IGES files
|
||||
|
||||
Version: V0.1B102 Date: Mon Dec 06 02:15:33 2004 +++++++++++++++++++++++++++++++
|
||||
* Redesign of undo/redo framework
|
||||
* Redesign of the customize pages framework
|
||||
* Simplified impl. of the General and Editor preference pages
|
||||
|
||||
Version: V0.1B101 Date: Thu Dec 02 22:32:22 2004 +++++++++++++++++++++++++++++++
|
||||
* First working experiments with associative parametric modeling
|
||||
|
||||
Version: V0.1B100 Date: Mon Nov 29 19:40:56 2004 +++++++++++++++++++++++++++++++
|
||||
* set up new exception handling for python call back
|
||||
* implement std property acces in App::Feature
|
||||
|
||||
Version: V0.1B99 Date: Fri Nov 26 22:40:56 2004 +++++++++++++++++++++++++++++++
|
||||
* replace QextMDI by own impl. using QWorkspace and QDockWindow
|
||||
* Tabbar added to the bottom of the workspace area
|
||||
|
||||
Version: V0.1B98 Date: Fri Nov 12 18:31:46 2004 +++++++++++++++++++++++++++++++
|
||||
|
||||
Version: V0.1B97 Date: Thu Nov 11 22:40:19 2004 +++++++++++++++++++++++++++++++
|
||||
|
||||
Version: V0.1B96 Date: Tue Nov 9 00:29:38 2004 +++++++++++++++++++++++++++++++
|
||||
* Impl. of a property editor as described in "Practical Qt"
|
||||
|
||||
Version: V0.1B95 Date: Wed Nov 03 17:34:53 2004 +++++++++++++++++++++++++++++++
|
||||
* Insert CutFeature
|
||||
* Automatic Property validation
|
||||
|
||||
Version: V0.1B94 Date: Sat Oct 23 18:58:52 2004 +++++++++++++++++++++++++++++++
|
||||
* finished implementation of the Tip of the day
|
||||
* splitted several big files in smaller ones
|
||||
* namespace Gui::Kexi for property editor
|
||||
* namespace Gui::Dialog * documentation for most dialogs
|
||||
* use QToolBox provided by Qt instead of StackBar
|
||||
* removed most of unneeded includes (not in PCH) to speed up compilation
|
||||
* use own code convention on several classes
|
||||
|
||||
Version: V0.1B93 Date: Thu Oct 14 21:55:08 2004 +++++++++++++++++++++++++++++++
|
||||
* features now inserted in the document and get called by a function
|
||||
|
||||
Version: V0.1B92 Date: Sun Oct 03 17:55:31 2004 +++++++++++++++++++++++++++++++
|
||||
* using namespaces in several modules in Gui now
|
||||
* documentation
|
||||
|
||||
Version: V0.1B91 Date: Tue Sep 21 15:34:55 2004 +++++++++++++++++++++++++++++++
|
||||
* New organsiation of Build scripts in fcbt (FreeCADBuildTool)
|
||||
* first experiments with namespaces With Console (FCConsole) and Interpreter
|
||||
* DocTypePy object for document behavior implented
|
||||
|
||||
Version: V0.1B90 Date: Tue Sep 07 19:25:03 2004 +++++++++++++++++++++++++++++++
|
||||
* Clean up path finding
|
||||
* port to OCC 5.2
|
||||
- switch to new iostream (finaly!!!)
|
||||
|
||||
Version: V0.1B89 Date: Fri Aug 20 19:03:18 2004 +++++++++++++++++++++++++++++++
|
||||
* pimple App/Application and App/Document
|
||||
* change python export
|
||||
|
||||
Version: V0.1B87 Date: Thu Jun 03 23:47:13 2004 +++++++++++++++++++++++++++++++
|
||||
* several minor bugs fixed
|
||||
* load settings at startup made in preferences
|
||||
* use Qt splashscreen
|
||||
|
||||
Version: V0.1B86 Date: Thu May 06 21:15:32 2004 +++++++++++++++++++++++++++++++
|
||||
* removed EnvPrints and put it in Config
|
||||
|
||||
Version: V0.1B85 Date: Sun Apr 18 01:22:41 2004 +++++++++++++++++++++++++++++++
|
||||
* Configure script finished, FreeCAD is now running under Linux :-)),
|
||||
start linux port of the modules now
|
||||
|
||||
Version: V0.1B84 Date: Wed Apr 07 15:59:56 2004 +++++++++++++++++++++++++++++++
|
||||
* Completely rework init phase and main.cpp
|
||||
|
||||
Version: V0.1B83 Date: Mon Apr 5 00:42:17 2004 +++++++++++++++++++++++++++++++
|
||||
* using Qt's qmake tool to build FreeCAD
|
||||
* FreeCAD now is running under Debian in console mode :-)
|
||||
but in GUI mode it crashes after the splashscreen appeared :-(
|
||||
|
||||
Version: V0.1B82 Date: Sat Mar 20 20:28:27 2004 +++++++++++++++++++++++++++++++
|
||||
* working configure script producing shared libraries
|
||||
|
||||
Version: V0.1B81 Date: Fri Jan 23 18:28:15 2004 +++++++++++++++++++++++++++++++
|
||||
* connect Python callback functions to QWidget signals
|
||||
|
||||
Version: V0.1B80 Date: Wed Jan 07 13:36:29 2004 +++++++++++++++++++++++++++++++
|
||||
* initial Python binding using Qt's WidgetFactory framework
|
||||
* Scintilla-Binding reimplemented
|
||||
* Autowaitcursor improved
|
||||
* a first version of python console added
|
||||
|
||||
Version: V0.1B79 Date: Thu Dec 18 21:48:48 2003 +++++++++++++++++++++++++++++++
|
||||
* included tkinter into libPack
|
||||
* using PyUnit and unittestgui.py in test framework
|
||||
|
||||
Version: V0.1B78 Date: Sun Nov 23 13:15:15 2003 +++++++++++++++++++++++++++++++
|
||||
* some fixes for the installer
|
||||
- using the right Mod dir in case of Installer
|
||||
- Using absolute Doc path
|
||||
- using Start/Program for Shortcuts
|
||||
|
||||
Version: V0.1B77 Date: Fri Nov 14 14:56:14 2003 +++++++++++++++++++++++++++++++
|
||||
* Finished Setup stuff
|
||||
* Removed all relativ paths
|
||||
* config HomePath is now not in bin anymore
|
||||
* all config files one dir up
|
||||
* FC runs now from every derectory
|
||||
* remove Startup and Install script
|
||||
|
||||
Version: V0.1B76 Date: Sat Nov 08 14:47:32 2003 +++++++++++++++++++++++++++++++
|
||||
* spent own module for BitmapFactory
|
||||
* make internationalization much more flexible and compile all the *.ts files
|
||||
into the application (no need of *.qm files at runtime any more)
|
||||
* new factory for scripts, widgets and languages
|
||||
* change FreeCAD and Projects to run with first Version of LibPack
|
||||
|
||||
Version: V0.1B75 Date: Sat Nov 01 18:38:15 2003 +++++++++++++++++++++++++++++++
|
||||
* changes on the Env handling for the LibPack
|
||||
- EnvMacros.h added
|
||||
* Startup bat
|
||||
* Tools to make Binary and Setup distributions
|
||||
* Internationalization is now supported
|
||||
|
||||
Version: V0.1B74 Date: Fri Oct 31 00:27:14 2003 +++++++++++++++++++++++++++++++
|
||||
* add function RegisterIcon() in ApplicationWindow
|
||||
|
||||
Version: V0.1B73 Date: Mon Sep 29 00:36:57 2003 +++++++++++++++++++++++++++++++
|
||||
* dependencies from header files reduced to speed up compilation
|
||||
* PIMPLed the ApplicationWindow class
|
||||
* make the python methods in ApplicationWindow more robust
|
||||
* improved the custom widget framework
|
||||
|
||||
Version: V0.1B72 Date: Wed Sep 24 19:06:32 2003 +++++++++++++++++++++++++++++++
|
||||
* make customizable widget framework much more flexible (from python)
|
||||
|
||||
Version: V0.1B71 Date: Sun Sep 14 17:38:19 2003 +++++++++++++++++++++++++++++++
|
||||
* make a template application; just run MakeApp.py with application name
|
||||
|
||||
Version: V0.1B69 Date: Sun Jul 27 13:29:20 2003 +++++++++++++++++++++++++++++++
|
||||
* several bugs fixed in property view
|
||||
* new item types implemented
|
||||
* make what() method of exception class to const
|
||||
(because you should use const <exc. class>& in catch block)
|
||||
* use the document provider classes for the whatsthis stuff
|
||||
|
||||
Version: V0.1B68 Date: Wed Jul 23 19:46:41 2003 +++++++++++++++++++++++++++++++
|
||||
* Add Feature Attribute
|
||||
* Add Function driver
|
||||
* Implement Test Command 2
|
||||
|
||||
Version: V0.1B67 Date: Sun Jul 20 00:23:56 2003 +++++++++++++++++++++++++++++++
|
||||
* Precompiled header stuff again
|
||||
* improved the spin box
|
||||
* Report output window added
|
||||
|
||||
Version: V0.1B66 Date: Sun Jul 13 17:15:34 2003 +++++++++++++++++++++++++++++++
|
||||
* draw transparent the additional area of resized pixmaps
|
||||
* draw a pixmap over another pixmap
|
||||
* a special spin box setting the value by mouse move
|
||||
* reimplementation of the WhatsThis framework
|
||||
* several commands
|
||||
* improved drag and drop for the commandline
|
||||
|
||||
Version: V0.1B65 Date: Sat Jul 12 11:44:20 2003 +++++++++++++++++++++++++++++++
|
||||
* finssh doc framework for basic use
|
||||
|
||||
Version: V0.1B64 Date: Sun Jun 15 01:20:15 2003 +++++++++++++++++++++++++++++++
|
||||
* Recent file list (MRU)
|
||||
* improvements in drawing dropdown button
|
||||
* allow to disable drag of menu items
|
||||
* bug fixed in load/save of window settings
|
||||
* Inventor Test command
|
||||
* Inventor BREP binding
|
||||
* examiner viewer
|
||||
|
||||
Version: V0.1B63 Date: Sun Jun 08 20:21:25 2003 +++++++++++++++++++++++++++++++
|
||||
* Adding the OCC Browser
|
||||
* Adding PropertyView
|
||||
* Tree heading layout
|
||||
* Settings dialog for Scintilla
|
||||
* switch between several view by clicking CTRL+Tab
|
||||
* Debug interface in FCInterpreter
|
||||
* switch between several styles
|
||||
* drop down button completely new reimplemented
|
||||
|
||||
Version: V0.1B62 Date: Sat May 31 11:53:56 2003 +++++++++++++++++++++++++++++++
|
||||
* redesign of Document view modell
|
||||
* removing ViewContainer
|
||||
* adding the OnHasMsg methodes
|
||||
* switching some stdCommands to message stile to allow views with own document
|
||||
* moving scintila to a passiv view modell
|
||||
* updated to new version of Scintilla (1.53)
|
||||
|
||||
Version: V0.1B61 Date: Sat May 24 17:35:52 2003 +++++++++++++++++++++++++++++++
|
||||
* binding for scintilla
|
||||
* switching the observer to templates
|
||||
* adding SoQt to the source
|
||||
* the template observer the M$ STL dont work any more
|
||||
|
||||
Version: V0.1B60 Date: Wed May 21 21:18:53 2003 +++++++++++++++++++++++++++++++
|
||||
* finishing close, save and update stuff
|
||||
|
||||
Version: V0.1B59 Date: Sun May 18 11:03:48 2003 +++++++++++++++++++++++++++++++
|
||||
* qextmdi added
|
||||
* some changes in close flow, still not finished
|
||||
* fix close stuff!
|
||||
|
||||
Version: V0.1B59 Date: Thu May 17 15:40:24 2003 +++++++++++++++++++++++++++++++
|
||||
* scintilla added
|
||||
* pragmas set for windows only
|
||||
* bug fixed in Buttongroug
|
||||
* add string for CustomWidget where to store
|
||||
|
||||
Version: V0.1B58 Date: Thu May 01 20:40:24 2003 +++++++++++++++++++++++++++++++
|
||||
* patch from werner
|
||||
* precompiled header (werner)
|
||||
|
||||
Version: V0.1B57 Date: Fri Apr 25 16:18:12 2003 +++++++++++++++++++++++++++++++
|
||||
* New modules for the ToptDS and Geometry wrapping
|
||||
* Script command for macro customizing
|
||||
|
||||
Version: V0.1B56 Date: Tue Apr 22 18:38:49 2003 +++++++++++++++++++++++++++++++
|
||||
* finish Macro recording
|
||||
* switching toggle commands
|
||||
* View preferences page
|
||||
* some bugfixing (werner)
|
||||
* QT3 fixes (werner)
|
||||
* DnD changes (werner)
|
||||
|
||||
Version: V0.1B55 Date: Fri Apr 18 23:08:12 2003 +++++++++++++++++++++++++++++++
|
||||
* add macro manager
|
||||
|
||||
Version: V0.1B54 Date: Thu Apr 17 12:19:12 2003 +++++++++++++++++++++++++++++++
|
||||
* commitin the patch from WErner
|
||||
- still problems with the TreeBar
|
||||
|
||||
Version: V0.1B53 Date: Sun Apr 13 15:33:23 2003 +++++++++++++++++++++++++++++++
|
||||
* patch from Werner about Linux
|
||||
* rezising the tree and the Icons
|
||||
|
||||
Version: V0.1B52 Date: Thu Apr 10 21:17:20 2003 +++++++++++++++++++++++++++++++
|
||||
* insert the TreeDockBar
|
||||
|
||||
Version: V0.1B51 Date: Sun Apr 06 21:27:35 2003 +++++++++++++++++++++++++++++++
|
||||
* Realy big patch from Werner
|
||||
- Fix a problem with the paning in MouseModel
|
||||
- Fixing workbench binding for std. menus
|
||||
- switch to QT_VER for easier changing QT Version
|
||||
- fix cmd_name bug in CmdBar
|
||||
- making command line dropabel (QT3)
|
||||
- frame for 3Dview
|
||||
- time in about dialog ;-)
|
||||
|
||||
Version: V0.1B50 Date: Fri Apr 04 22:10:24 2003 +++++++++++++++++++++++++++++++
|
||||
* Fix on the window rewrite
|
||||
* some work on the Linux port
|
||||
|
||||
Version: V0.1B49 Date: Thu Apr 03 22:45:35 2003 +++++++++++++++++++++++++++++++
|
||||
* Master redisign of the window system, not yet full working
|
||||
|
||||
Version: V0.1B48 Date: Sun Mar 30 15:06:23 2003 +++++++++++++++++++++++++++++++
|
||||
* Big patch from Werner about:
|
||||
- feeding toolbars and Commandbar and menus from the parameterts
|
||||
- customizing works with positions in command bar and toolbar
|
||||
- customizing by draging from menu into toolbar and commandbar
|
||||
|
||||
Version: V0.1B47 Date: Fri Mar 28 18:24:36 2003 +++++++++++++++++++++++++++++++
|
||||
* Import App Module added
|
||||
* removing Part.py and PartGui.py
|
||||
|
||||
Version: V0.1B46 Date: Wed Mar 26 18:02:11 2003 +++++++++++++++++++++++++++++++
|
||||
* new methodes in ParameterGrp (IsEmpty(), HasGroup() )
|
||||
|
||||
Version: V0.1B45 Date: Thu Mar 20 21:05:21 2003 +++++++++++++++++++++++++++++++
|
||||
* Testframe for Parameter and removal
|
||||
|
||||
Version: V0.1B44 Date: Wed Mar 19 21:41:52 2003 +++++++++++++++++++++++++++++++
|
||||
* deletion of Parameter and Grps
|
||||
* Observer delete notification
|
||||
|
||||
Version: V0.1B43 Date: Sun Mar 16 22:32:35 2003 +++++++++++++++++++++++++++++++
|
||||
* startet Undo Redo logic
|
||||
|
||||
Version: V0.1B42 Date: Thu Mar 13 21:36:58 2003 +++++++++++++++++++++++++++++++
|
||||
* changes in Customize Dialog
|
||||
|
||||
Version: V0.1B41 Date: Sat Mar 08 19:16:05 2003 +++++++++++++++++++++++++++++++
|
||||
* again new resource concept for commands
|
||||
* python command object
|
||||
* test application
|
||||
- implemented some basic tests
|
||||
|
||||
Version: V0.1B40 Date: Tue Mar 04 21:53:02 2003 +++++++++++++++++++++++++++++++
|
||||
* Activiti update
|
||||
* new resource concept in commands
|
||||
* Command groups
|
||||
* Command belonging to AppModules
|
||||
* Checking on unsaved files in close()
|
||||
|
||||
Version: V0.1B39 Date: Mon Mar 03 12:32:14 2003 +++++++++++++++++++++++++++++++
|
||||
* include werners patch
|
||||
|
||||
Version: V0.1B38 Date: Thu Feb 27 22:19:35 2003 +++++++++++++++++++++++++++++++
|
||||
* fix of memory leack in CmdBar (werner)
|
||||
* start rebulding FCCommand framework
|
||||
|
||||
Version: V0.1B37 Date: Tue Feb 25 20:29:19 2003 +++++++++++++++++++++++++++++++
|
||||
* massiv improved costomize dialog (werner)
|
||||
- sorting position of toolbars
|
||||
|
||||
Version: V0.1B36 Date: Sat Feb 22 18:12:19 2003 +++++++++++++++++++++++++++++++
|
||||
* fix python problem (Py_INCREF(Py_None))!
|
||||
|
||||
Version: V0.1B35 Date: Wed Feb 19 19:41:39 2003 +++++++++++++++++++++++++++++++
|
||||
* new Linux patch (Vaclav)
|
||||
* sequencer break windows only (werner)
|
||||
* run methode in CommandLine (werner)
|
||||
|
||||
Version: V0.1B34 Date: Sun Feb 16 11:55:21 2003 +++++++++++++++++++++++++++++++
|
||||
* finish the Html-view prefernces dialog (werner)
|
||||
* making unique defines for operating system in Config.h
|
||||
* GetActiveWorkbench methode
|
||||
* included VC7 projects (werner)
|
||||
|
||||
Version: V0.1B33 Date: Fri Feb 14 19:58:58 2003 +++++++++++++++++++++++++++++++
|
||||
* dynamic cinfiguration dialog (Werner)
|
||||
- first preference dialog for the html view
|
||||
* Full path parameter implemented
|
||||
* some fixes in config registry
|
||||
|
||||
Version: V0.1B32 Date: Sun Feb 09 22:16:10 2003 +++++++++++++++++++++++++++++++
|
||||
* fix debug module loading
|
||||
* implementing startup config registrie and access functions in App.
|
||||
* implementing Doc Template logic and Part Template
|
||||
|
||||
Version: V0.1B31 Date: Fri Feb 07 22:26:22 2003 +++++++++++++++++++++++++++++++
|
||||
* ifdefs for QT 3 and 2.3 usage (werner)
|
||||
|
||||
Version: V0.1B30 Date: Thu Feb 06 20:47:18 2003 +++++++++++++++++++++++++++++++
|
||||
* fix for the CommandBar (Werner)
|
||||
* fix for module loding
|
||||
|
||||
Version: V0.1B29 Date: Wed Feb 05 09:22:38 2003 +++++++++++++++++++++++++++++++
|
||||
* patch from Werner
|
||||
- some small changes
|
||||
- rewritten Command Bar
|
||||
* some work on the Part module (now loading in release)
|
||||
|
||||
Version: V0.1B28 Date: Fri Jan 31 17:58:13 2003 +++++++++++++++++++++++++++++++
|
||||
* switching from Stlport IOSTREAM to VC6 iostream
|
||||
* removing FC container wrapping
|
||||
* starting serios work on module loading in part and sketcher
|
||||
|
||||
Version: V0.1B27 Date: Sun Jan 26 21:25:59 2003 +++++++++++++++++++++++++++++++
|
||||
* Lot of stuff from Werner
|
||||
- New customize dialog
|
||||
- lot of work on preferences
|
||||
|
||||
Version: V0.1B26 Date: Tue Jan 21 05:59:01 2003 +++++++++++++++++++++++++++++++
|
||||
* Preferences Widget Framework (Werner)
|
||||
- New module WidgetFactory
|
||||
- New modeul PrefWidget
|
||||
|
||||
Version: V0.1B25 Date: Sun Jan 19 18:20:51 2003 +++++++++++++++++++++++++++++++
|
||||
* Big Linux port patch from Vaclav
|
||||
- some fixes on implicite type conversion (Vaclav)
|
||||
- moving all .cxx to .cpp mainly in gui
|
||||
- moving DlgCusomizeImpl to Imp
|
||||
- and InitGui to GuiInit
|
||||
- rmoving X() macro (trouble on Linux)
|
||||
- Linux Gui console (Vaclav)
|
||||
- Using new sstream on Linux (Vaclac)
|
||||
- fixing some case stuff in include (Vaclav)
|
||||
* some work on the main MouseModel (Werner)
|
||||
|
||||
Version: V0.1B24 Date: Sun Jan 12 22:15:29 2003 +++++++++++++++++++++++++++++++
|
||||
* switching workbenches
|
||||
|
||||
Version: V0.1B23 Date: Fri Jan 10 17:43:13 2003 +++++++++++++++++++++++++++++++
|
||||
* fix in part module
|
||||
|
||||
Version: V0.1B22 Date: Thu Jan 09 22:16:02 2003 +++++++++++++++++++++++++++++++
|
||||
* Add FCBmpFactory
|
||||
* New Methodes in Gui. (python)
|
||||
|
||||
Version: V0.1B21 Date: Mon Jan 06 20:53:48 2003 +++++++++++++++++++++++++++++++
|
||||
* Building up Part Application
|
||||
* starting Test Application
|
||||
* Adding FCFactory in Base
|
||||
|
||||
Version: V0.1B20 Date: Mon Jan 06 11:31:16 2003 +++++++++++++++++++++++++++++++
|
||||
* Clean up Gui.dsp
|
||||
* split up std commands
|
||||
|
||||
Version: V0.1B19 Date: Sat Jan 04 12:23:49 2003 +++++++++++++++++++++++++++++++
|
||||
* new DlgCustomize (Werner)
|
||||
|
||||
Version: V0.1B18 Date: Fri Jan 03 19:26:56 2003 +++++++++++++++++++++++++++++++
|
||||
* FirstPreferences Dialog
|
||||
* First Macro Dialogs
|
||||
|
||||
Version: V0.1B17 Date: Thu Jan 02 21:50:27 2003 +++++++++++++++++++++++++++++++
|
||||
* First Version Parameter Dialog
|
||||
* New Methodes on FCParameterGrp
|
||||
|
||||
Version: V0.1B16 Date: Wed Jan 01 18:06:46 2003 +++++++++++++++++++++++++++++++
|
||||
* Needed interface in CmdBar (Werner)
|
||||
* fixes in Parameter
|
||||
|
||||
Version: V0.1B15 Date: Wed Jan 01 17:09:53 2003 +++++++++++++++++++++++++++++++
|
||||
* Changing the install prozess
|
||||
* implementing the Python toolbar bindings
|
||||
* Split Init.py in Init and Startup
|
||||
* Finish verbose mode (-v)
|
||||
|
||||
Version: V0.1B14 Date: Mon Dec 30 12:42:22 2002 +++++++++++++++++++++++++++++++
|
||||
* coupling FCaction on FCCmdBar (Werner)
|
||||
* New group functions in FCParameter (Juergen)
|
||||
* Progress Bar (Werner)
|
||||
|
||||
Version: V0.1B13 Date: Thu Dec 26 19:58:57 2002 +++++++++++++++++++++++++++++++
|
||||
* View Commands
|
||||
* switching StdViews from slots to Messages
|
||||
* try fixing Dock windows
|
||||
|
||||
Version: V0.1B12 Date: Thu Dec 26 14:54:54 2002 +++++++++++++++++++++++++++++++
|
||||
* New Splasher from Werner
|
||||
* clean up main (-v option)
|
||||
* User Parameter
|
||||
* New Background color
|
||||
* Werner get the automatic wait cursor to work
|
||||
* Dimension field in the status bar by Werner
|
||||
|
||||
Version: V0.1B11 Date: Fri Dec 20 10:44:09 2002 +++++++++++++++++++++++++++++++
|
||||
* First simple Implementation of Tree Raw
|
||||
|
||||
Version: V0.1B10 Date: Wed Dec 18 21:44:21 2002 +++++++++++++++++++++++++++++++
|
||||
* fix wrong document bug
|
||||
* html_view cut off horizontal slider
|
||||
|
||||
Version: V0.1B9 Date: Mon Dec 16 14:40:59 2002 +++++++++++++++++++++++++++++++
|
||||
* First version of Werners waiting cursor
|
||||
* Activ View finished
|
||||
* Send Msg to view finished
|
||||
* Test1 importing BREP
|
||||
|
||||
Version: V0.1B8 Date: Mon Dec 09 20:51:27 2002 +++++++++++++++++++++++++++++++
|
||||
* Fixes for button bar from Werner
|
||||
* New Std Commands
|
||||
|
||||
Version: V0.1B7 Date: Fri Dec 06 17:30:26 2002 +++++++++++++++++++++++++++++++
|
||||
* insert new button bar from Werner
|
||||
* Activated view methods and SendMsgToActiveView()
|
||||
|
||||
Version: V0.1B6 Date: Thu Dec 05 20:59:11 2002 +++++++++++++++++++++++++++++++
|
||||
* Clean Up GuiApplication
|
||||
* Add GUI Console observer
|
||||
@@ -1,481 +0,0 @@
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1991 Free Software Foundation, Inc.
|
||||
51 Franklin Street - Fifth Floor
|
||||
Boston, MA 02110-1301, USA.
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the library GPL. It is
|
||||
numbered 2 because it goes with version 2 of the ordinary GPL.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Library General Public License, applies to some
|
||||
specially designated Free Software Foundation software, and to any
|
||||
other libraries whose authors decide to use it. You can use it for
|
||||
your libraries, 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
|
||||
this service 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 make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if
|
||||
you distribute copies of the library, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link a program with the library, you must provide
|
||||
complete object files to the recipients so that they can relink them
|
||||
with the library, after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
Our method of protecting your rights has two steps: (1) copyright
|
||||
the library, and (2) offer you this license which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
Also, for each distributor's protection, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
library. If the library is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original
|
||||
version, so that any problems introduced by others will not reflect on
|
||||
the original authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that companies distributing free
|
||||
software will individually obtain patent licenses, thus in effect
|
||||
transforming the program into proprietary software. To prevent this,
|
||||
we have made it clear that any patent must be licensed for everyone's
|
||||
free use or not licensed at all.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the ordinary
|
||||
GNU General Public License, which was designed for utility programs. This
|
||||
license, the GNU Library General Public License, applies to certain
|
||||
designated libraries. This license is quite different from the ordinary
|
||||
one; be sure to read it in full, and don't assume that anything in it is
|
||||
the same as in the ordinary license.
|
||||
|
||||
The reason we have a separate public license for some libraries is that
|
||||
they blur the distinction we usually make between modifying or adding to a
|
||||
program and simply using it. Linking a program with a library, without
|
||||
changing the library, is in some sense simply using the library, and is
|
||||
analogous to running a utility program or application program. However, in
|
||||
a textual and legal sense, the linked executable is a combined work, a
|
||||
derivative of the original library, and the ordinary General Public License
|
||||
treats it as such.
|
||||
|
||||
Because of this blurred distinction, using the ordinary General
|
||||
Public License for libraries did not effectively promote software
|
||||
sharing, because most developers did not use the libraries. We
|
||||
concluded that weaker conditions might promote sharing better.
|
||||
|
||||
However, unrestricted linking of non-free programs would deprive the
|
||||
users of those programs of all benefit from the free status of the
|
||||
libraries themselves. This Library General Public License is intended to
|
||||
permit developers of non-free programs to use free libraries, while
|
||||
preserving your freedom as a user of such programs to change the free
|
||||
libraries that are incorporated in them. (We have not seen how to achieve
|
||||
this as regards changes in header files, but we have achieved it as regards
|
||||
changes in the actual functions of the Library.) The hope is that this
|
||||
will lead to faster development of free libraries.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, while the latter only
|
||||
works together with the library.
|
||||
|
||||
Note that it is possible for a library to be covered by the ordinary
|
||||
General Public License rather than by this special one.
|
||||
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library which
|
||||
contains a notice placed by the copyright holder or other authorized
|
||||
party saying it may be distributed under the terms of this Library
|
||||
General Public License (also called "this License"). Each licensee is
|
||||
addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also compile or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
c) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
d) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the source code distributed need not include anything that is normally
|
||||
distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. 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 not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
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
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Library 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
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "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
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY 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
|
||||
LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey 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 library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
SUBDIRS=data src
|
||||
|
||||
EXTRA_DIST = \
|
||||
cMake/ConfigureChecks.cmake \
|
||||
cMake/FindCoin3D.cmake \
|
||||
cMake/FindCoin3DDoc.cmake \
|
||||
cMake/FindEigen2.cmake \
|
||||
cMake/FindEigen3.cmake \
|
||||
cMake/FindF2C.cmake \
|
||||
cMake/FindODE.cmake \
|
||||
cMake/FindOpenCasCade.cmake \
|
||||
cMake/FindOpenCV.cmake \
|
||||
cMake/FindSoQt.cmake \
|
||||
cMake/FindSpnav.cmake \
|
||||
cMake/FindXercesC.cmake \
|
||||
cMake/FreeCadMacros.cmake \
|
||||
cMake/UseLibPack6x.cmake \
|
||||
cMake/UseLibPack7x.cmake \
|
||||
cMake/UseLibPackCustom.cmake \
|
||||
config.h.cmake \
|
||||
CMakeLists.txt \
|
||||
autogen.sh \
|
||||
BuildAll.bat \
|
||||
build.sh \
|
||||
ChangeLog.txt \
|
||||
copying.lib \
|
||||
README.Linux \
|
||||
README.Win32
|
||||
|
||||
debian-package:
|
||||
$(top_srcdir)/package/makedebian.sh
|
||||
|
||||
if HAVE_DOXYGEN
|
||||
devdoc:
|
||||
doxygen $(top_builddir)/src/Doc/BuildDevDoc.cfg
|
||||
endif
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
FreeCAD
|
||||
=======
|
||||
|
||||
FreeCAD is a general purpose feature-based, parametric 3D modeler for CAD, MCAD,
|
||||
CAx, CAE and PLM, aimed directly at mechanical engineering and product design but
|
||||
also fits a wider range of uses in engineering, such as architecture or other engineering
|
||||
specialties. It is 100% Open Source (LGPL2+ license) and extremely modular, allowing
|
||||
for very advanced extension and customization.
|
||||
|
||||
FreeCAD is based on OpenCasCade, a powerful geometry kernel, features an Open Inventor-compliant
|
||||
3D scene representation model provided by the Coin 3D library, and a broad Python API.
|
||||
The interface is built with Qt. FreeCAD runs exactly the same way on Windows, Mac OSX, BSD and
|
||||
Linux platforms.
|
||||
|
||||
Home page and wiki documentation: http://free-cad.sf.net
|
||||
Forum: http://sourceforge.net/apps/phpbb/free-cad/
|
||||
Bug tracker: http://sourceforge.net/apps/mantisbt/free-cad/
|
||||
Official git link: git://free-cad.git.sourceforge.net/free-cad/free-cad
|
||||
|
||||
Building
|
||||
========
|
||||
|
||||
Compiling FreeCAD requires to install several heavyweight libraries and their development
|
||||
files such as OpenCasCADe, Coin and Qt, listed in the pages below. Once this is done,
|
||||
FreeCAD can be simply compiled with cMake. On windows, these libraries are bundled and
|
||||
offeredby the FreeCAD team in a convenience package, on Linux they are usually found
|
||||
in your distribution's repositories and on Mac OSX and other platforms you will usually
|
||||
need to compile them yourself.
|
||||
|
||||
Note that autotools build system can still be used but will be obsoleted soon.
|
||||
|
||||
The pages below contain up-to-date build instructions:
|
||||
|
||||
For Linux: http://sourceforge.net/apps/mediawiki/free-cad/index.php?title=CompileOnUnix
|
||||
For windows: http://sourceforge.net/apps/mediawiki/free-cad/index.php?title=CompileOnWindows
|
||||
For Mac OSX: http://sourceforge.net/apps/mediawiki/free-cad/index.php?title=CompileOnMac
|
||||
|
||||
In this folder you will also find additional README files, specific for each platform.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
|
||||
How to build and run FreeCAD under Cygwin
|
||||
=========================================
|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
To compile FreeCAD, you will need, besides functioning Cygwin environment
|
||||
and programming tools (like compiler), the following libraries:
|
||||
|
||||
o Python (http://www.python.org), >= 2.5.x
|
||||
o Qt (http://www.trolltech.no), >= 4.1.x
|
||||
o Coin3D (http://www.coin3d.org), >= 2.4.x
|
||||
o SoQt (http://www.coin3d.org), >= 1.2.x
|
||||
o Xerces-c (http://xml.apache.org/dist/xerces-c/)
|
||||
o zlib (http://www.zlib.net/)
|
||||
|
||||
As far as I know, except of Coin3D and SoQt all libraries are available as prebuilt
|
||||
binary packages from one of the Cygwin mirrors. To install them, first download the
|
||||
latest version of setup.exe from www.cygwin.com and run it with administrator rights.
|
||||
Then follow the instructions of the wizard until the list of all available packages
|
||||
appears. Select the devel files of all the required libraries and install them.
|
||||
|
||||
Then download the source tarballs of Coin3D and SoQt and unpack them into a directory
|
||||
of your choice.
|
||||
The Coin library can be built with ./configure --disable-msvc;make; make install.
|
||||
|
||||
Building SoQt is a bit tricky and I haven't managed yet to build it in a proper way.
|
||||
There are various problems with X11 functions and Windows API functions which I
|
||||
don't know how to solve.
|
||||
|
||||
And for the Mesh module of FreeCAD the additional libraries
|
||||
o GTS Library (http://gts.sourceforge.net)
|
||||
o Wild Magic (http://www.geometrictools.com)
|
||||
o OpenCASCADE (http://www.opencascade.org), you need >=5.2 here
|
||||
are required. OpenCASCADE is also needed by the Part and Raytracing modules.
|
||||
|
||||
Note: As OpenCASCADE that is also required by the Mesh, Part and Raytracing
|
||||
modules is not available for Cygwin it is not possible to build them
|
||||
for this platform. It is planned for the future to move all OpenCASCADE
|
||||
dependencies of the Mesh module into a separate module so that at least
|
||||
this module can be built under Cygwin.
|
||||
|
||||
Note: All libraries listed above must be built as shared library. Refer to their
|
||||
documentation to see how to do.
|
||||
|
||||
Note: If possible you should enable thread support for the libraries. At least for
|
||||
Qt thread support is strongly recommended, otherwise you will run into linker
|
||||
errors at build time of FreeCAD.
|
||||
|
||||
Note: zlib might be already on your system, as this is a library that is used
|
||||
from a lot of other libraries.
|
||||
|
||||
Note: There seems to be various problems with Qt's uic tool of the Cygwin port.
|
||||
|
||||
Due to these problems it is not possible to run the GUI under Cygwin at the
|
||||
moment. It is only possible to run the commandline version.
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
For the build process of FreeCAD we make use of configure scripts.
|
||||
To have an overview of all options type in ./configure --help, first.
|
||||
|
||||
If you have installed all libraries above into standard paths you need not any of the
|
||||
'--with' options at all. Unless you have installed any library into a non-standard path,
|
||||
then make use of the --with-XXX-includes or --with-XXX-libs options.
|
||||
(XXX represents the corresponding library.)
|
||||
|
||||
Note: Due to some limitations of the Windows platform it is not possible to build
|
||||
libraries with unresolved symbols at link time. Thus it is strongly recommended to run
|
||||
./configure with the option LDFLAGS=-no-undefined, otherwise the creation of shared
|
||||
libraries fails. For more details see section 11.2.1 Creating Libtool Libraries with
|
||||
Automake of the libtool documentation.
|
||||
|
||||
Note: To specify FreeCAD's root directory it is recommended to use only the '--prefix'
|
||||
option from the configure script but not the --bindir, --libdir, ... options, because
|
||||
at startup FreeCAD makes assumptions where its lib-, doc-, .. directories reside.
|
||||
The default root directory is located in ~/FreeCAD.
|
||||
|
||||
If you know how to work with GNU autoconf, feel free to contribute improvements
|
||||
to our configuration scripts --- that would be great.
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
Once you have built the sources successfully using 'make' with 'make install' you can
|
||||
install FreeCAD onto your machine whereever you want. Go to the directory FreeCAD/bin
|
||||
and just type in ./FreeCADCmd.
|
||||
FreeCAD's default root directory resides under ~/FreeCAD, so you don't need root privileges
|
||||
therefore.
|
||||
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
|
||||
How to build and run FreeCAD under Linux
|
||||
========================================
|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
To compile FreeCAD you will need, besides functioning Linux
|
||||
and programming tools (like compiler), the following libraries:
|
||||
|
||||
o Python (http://www.python.org), >= 2.5.x
|
||||
o boost (http://www.boost.org), >= 1.33.1
|
||||
o Qt (http://www.qtsoftware.com), >= 4.1.x
|
||||
o Coin3D (http://www.coin3d.org), >= 2.4.x
|
||||
o SoQt (http://www.coin3d.org), >= 1.2.x
|
||||
o Xerces-C++ (http://xml.apache.org/dist/xerces-c/), >= 2.6
|
||||
o zlib (http://www.zlib.net/)
|
||||
|
||||
And for the some FreeCAD modules the additional libraries
|
||||
o OpenCascade (http://www.opencascade.org), >= 5.2
|
||||
o Eigen2 (http://eigen.tuxfamily.org/index.php?title=Main_Page), >= 2.0.5
|
||||
o ODE (http://www.ode.org), >= 0.10.x
|
||||
are required.
|
||||
|
||||
Note: zlib might be already on your system, as this is a library that is used
|
||||
by a lot of libraries, too.
|
||||
|
||||
Note: All libraries listed above must be built as shared library. Refer to their
|
||||
documentation to see how to do.
|
||||
|
||||
Note: If possible you should enable thread support for the libraries. At least for
|
||||
Qt thread support is strongly recommended, otherwise you will run into linker
|
||||
errors at build time of FreeCAD.
|
||||
|
||||
Note: The package for SoQt for Debian based systems may lack of the soqt.m4 macro file.
|
||||
You should download the file from www.coin3d.org and copy it to /usr/share/aclocal.
|
||||
|
||||
Note: The package for SoQt (at least for older Debian based systems) is usually built to link
|
||||
against Qt3. This, however, causes a segmentation fault when using with FreeCAD because
|
||||
it links against Qt4 and you get a mixup of Qt3 and Qt4 libraries.
|
||||
To fix this problem you must download the sources from www.coin3d.org and run
|
||||
configure with the 'with-qt=DIR' switch specifying the location of Qt4.
|
||||
Probably, it's best to 'make install' the newly built SoQt into a different directory
|
||||
than the installed SoQt to avoid to corrupt your package database and/or to keep other
|
||||
applications working. When configuring FreeCAD you have to use the '--with-soqt=DIR'
|
||||
switch specifying the path of the newly installed SoQt.
|
||||
For newer Debian releases this already solved by a new package that links against Qt4.
|
||||
|
||||
Note: For OpenCascade there does not exist an official .deb package for older Debian based systems
|
||||
and many other distributions, so you have to download the latest version from www.opencascade.org.
|
||||
Install the package normally, be aware that the installer is a java program that requires
|
||||
the official java runtime edition from Sun, not the open-source java (gij) that is bundled
|
||||
with Debian or Ubuntu. Install it if needed:
|
||||
|
||||
sudo apt-get remove gij
|
||||
sudo apt-get install sun-java5-bin
|
||||
|
||||
Be careful, if you use gij java with other things like a browser plugin, they won't work
|
||||
anymore. Now start the installer with
|
||||
java -jar setup.jar
|
||||
|
||||
With Debian Lenny this issue is solved. There is an OpenCascade package currently in the
|
||||
non-free section.
|
||||
|
||||
|
||||
During the compilation some Python scripts get executed. So the Python interpreter has
|
||||
to work properly.
|
||||
|
||||
Optionally, you can build the Qt plugin that provides all custom widgets of FreeCAD
|
||||
we need for the Qt Designer. The sources are located under Tools/plugins/widget.
|
||||
So far, we don't provide a makefile but calling 'qmake plugin.pro' creates it and
|
||||
calling 'make' will create the library libFreeCAD_widgets.so. To make known this library
|
||||
to your Qt Designer you have to copy the file to $QTDIR/plugin/designer.
|
||||
|
||||
On our Wiki you'll find more information to build with different Linux distributions at
|
||||
http://sourceforge.net/apps/mediawiki/free-cad/index.php?title=CompileOnUnix
|
||||
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
For the build process of FreeCAD we make use of configure scripts.
|
||||
To have an overview of all switches type in ./configure --help, first.
|
||||
|
||||
You don't need any of these switches unless you have installed a library into a non-standard
|
||||
path. In this case make use of the appropriate --with-XXX-include or --with-XXX-lib switches,
|
||||
please. (XXX stands for the corresponding library.)
|
||||
Of course, for above mentioned problem with SoQt you should use the '--with-soqt=DIR' switch.
|
||||
|
||||
Note: To specify FreeCAD's root directory it is recommended to use only the '--prefix'
|
||||
switch from the configure script but not the --bindir, --libdir, ... switches, because at startup
|
||||
FreeCAD makes assumptions about where its module directories are installed.
|
||||
|
||||
|
||||
Installation & Running FreeCAD
|
||||
------------------------------
|
||||
|
||||
Once you have built the sources successfully using 'make', with 'make install' you can
|
||||
install FreeCAD onto your machine whereever you want. FreeCAD's default root directory
|
||||
is $HOME/FreeCAD, so you don't need root privileges therefore. To run FreeCAD go to
|
||||
$PREFIX/FreeCAD/bin and type in ./FreeCAD.
|
||||
|
||||
Note: In the past there were a lot of problems that the Part workbench couldn't be loaded.
|
||||
The problem is that the system wasn't able to find the OpenCascade library files.
|
||||
To fix this problem you are strongly recommended to add the path of these libraries
|
||||
to LD_LIBRARY_PATH or even to add it to ld.so.conf and run ldconfig.
|
||||
|
||||
|
||||
So, just have fun!
|
||||
|
||||
|
||||
|
||||
Werner Mayer <wmayer@users.sourceforge.net>
|
||||
May 2010
|
||||
+302
@@ -0,0 +1,302 @@
|
||||
|
||||
How to build and run FreeCAD under MSYS/MinGW
|
||||
=============================================
|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
Here comes a short introduction how to setup a MSYS/MinGW environment
|
||||
on a Windows system, to build all needed libraries and finally to build
|
||||
the FreeCAD sources.
|
||||
|
||||
o MSYS/MinGW
|
||||
If not already installed get a MinGW installer from the Sourceforge page at
|
||||
http://sourceforge.net/projects/mingw. When writing this tutorial the latest
|
||||
version was mingw-get-inst-20100831.exe. Download and just double-click the
|
||||
excutable. This installs the compiler and a minimal Windows developer environment.
|
||||
Make sure to also install the Fortran compiler because there is a single Fortran
|
||||
file in the 3rd party folder of the FreeCAD sources.
|
||||
|
||||
Then as second step MSYS needs to be installed to have an environment to run
|
||||
./configure scripts which we make heavy use of in order to build all needed
|
||||
libraries. From the Soureforge page the file MSYS-1.0.11.exe was taken.
|
||||
|
||||
A virginal MSYS/MinGW installation lacks of a few modules we later need.
|
||||
First, we need the utility pexport which can be found in the file
|
||||
pexports-0.44-1-mingw32-bin.tar.lzma. I don't know where to put this file
|
||||
and how to make MSYS to install the stuff inside. But the file can be opened
|
||||
with a ZIP program and the content can be copied to their destination manually.
|
||||
Here, the pexports utility can go to the bin directory of your MinGW installation.
|
||||
|
||||
Then, we also need the development files for the pthreads module which is part
|
||||
of the file pthreads-w32-2.8.0-3-mingw32-dev.tar.lzma. Just download and copy
|
||||
the files inside to your MinGW installation.
|
||||
|
||||
|
||||
o CMake
|
||||
Download the CMake utility from http://www.cmake.org/cmake/resources/software.html.
|
||||
Get the archive with the binaries for the Windows platform and unpack whereever you
|
||||
want. There is nothing further to do for this.
|
||||
|
||||
o SWIG
|
||||
Download the SWIG utility from www.swig.org and extract it somewhere on your harddisk.
|
||||
|
||||
|
||||
Third party libraries
|
||||
---------------------
|
||||
|
||||
Here is a description which libraries we need for FreeCAD and how to build them from
|
||||
the sources. In order not to pollute our MinGW installation with too many files from
|
||||
the 3rd party libraries we have to build you can e.g. create a sub-directory "local"
|
||||
in your MSYS installation. If you have installed MSYS under C:\MSYS then simply create
|
||||
the directory C:\MSYS\1.0\local.
|
||||
|
||||
|
||||
o zlib
|
||||
For zlib there is already a ready package for MinGW. So, therefore simply download
|
||||
the file libz-1.2.3-1-mingw32-dev.tar.gz from the Sourceforge site and extract the
|
||||
two directories lib and include to C:\MSYS\1.0\local.
|
||||
|
||||
|
||||
o Python
|
||||
It seems to be nearly impossible to build the Python sources directly with the MinGW
|
||||
compiler. This is because some Python modules require some features which are not
|
||||
implemented on the MinGW platform. Fortunately, the Python sources are plain C code
|
||||
and instead of trying to build it with MinGW you can get a ready binary package built
|
||||
with the MSVC compiler. You can install the Python stuff whereever you want. Afterwards
|
||||
copy the include folder to C:\MSYS\1.0\local, the DLL can go to C:\MSYS\1.0\local\bin.
|
||||
|
||||
Now we also need the so called import library. There we cannot use the .lib file which
|
||||
comes together with the installer. But it's easy to create one with the pexports/dlltool
|
||||
utilities. Assuming the Python version is 2.6 do these two steps:
|
||||
|
||||
pexports python26.dll > python26.def
|
||||
dlltool -D python26.dll -d python26.def -l libpython26.dll.a
|
||||
|
||||
The file libpython26.dll.a can now be moved to C:\MSYS\1.0\local\lib.
|
||||
|
||||
|
||||
o f2c
|
||||
For this library we don't need any header files but only the import library to build the
|
||||
Salome SMESH sources. The easiest way to build this file is:
|
||||
|
||||
pexports libgfortran-3.dll > f2c.def
|
||||
dlltool -D libgfortran-3.dll -d f2c.def -l libf2c.dll.a
|
||||
|
||||
The file libf2c.dll.a can now be moved to C:\MSYS\1.0\local\lib.
|
||||
|
||||
|
||||
o xerces-c
|
||||
Download a source archive from http://xml.apache.org/dist/xerces-c/ and extract it.
|
||||
Open a MSYS command line window and change to the xerces-c sources. From there run
|
||||
|
||||
./configure LDFLAGS=-no-undefined
|
||||
|
||||
Once ./configure has finished it's best to move to the source directory because we
|
||||
don't need to build the dozens of test applications and other stuff. So, do this:
|
||||
|
||||
cd src
|
||||
make
|
||||
make install
|
||||
|
||||
This takes a few minutes to be done.
|
||||
|
||||
|
||||
o boost
|
||||
For boost there exists a testing package with cmake support. This, however, seems to be
|
||||
stable enough to build with the MinGW compiler. So, get the file boost-1.41.0.cmake0.zip
|
||||
from http://sodium.resophonic.com/boost-cmake/1.41.0.cmake0/ and unpack it.
|
||||
|
||||
Now, start the cmake-gui.exe from within the MSYS command line. This is necessary for cmake
|
||||
in order to find the compiler and other stuff. Select the folder of the boost sources with
|
||||
the CMakeLists.txt file, select a build directory and start Configure. You'll be asked for
|
||||
which system you want to generate the Makefiles. Select MSYS/Makefiles, not MinGW/Makefiles.
|
||||
|
||||
When the configuration step has finished go to the options and search for WINMANGLE_LIBNAMES.
|
||||
Switch this off because otherwise the boost library names contain the compiler name. This
|
||||
causes the boost cmake check to fail later when we try to build the FreeCAD sources. And for
|
||||
the installtion folder choose the directory C:\MSYS\1.0\local.
|
||||
|
||||
So, reconfigure boost and press on Generate once it has finished. Close the CMake GUI window
|
||||
and enter
|
||||
|
||||
make
|
||||
make install
|
||||
|
||||
into the command line. This will take a couple of minutes.
|
||||
|
||||
|
||||
o eigen2
|
||||
Download eigen-2.0.15.tar.gz or any later version from http://eigen.tuxfamily.org/index.php?title=Main_Page.
|
||||
Unpack the files and start again cmake-gui. Set the installation directory to C:\MSYS\1.0\local
|
||||
and press on Configure and Generate. Close the window and start the installation with
|
||||
|
||||
make
|
||||
make install
|
||||
|
||||
|
||||
o Qt4
|
||||
From the Qt website at ftp://ftp.trollech.com you can download already prebuilt packages for the
|
||||
MinGW platform. But depending on the version you have installed it can happen that they don't fit
|
||||
together. In this case the source tarball must be downloaded. Use version 4.5.3 or higher. Unpack
|
||||
the sources and start the configure.exe you'll find inside the sources.
|
||||
|
||||
./configure
|
||||
|
||||
By default the build the debug and release version. If you only want the release version use the
|
||||
option "-release".
|
||||
|
||||
Configure will ask you some questions under which license you want to use Qt. Choose LGPL here.
|
||||
Now run the build with
|
||||
|
||||
make
|
||||
|
||||
This can take quite some time because Qt has become a really huge library over the years. Once the
|
||||
build has finished run a
|
||||
|
||||
make install
|
||||
|
||||
to copy the header files to their right place. All the binaries and header files are still inside
|
||||
the source folder. If you like you can copy all the .dll, .a, and the direcories under "include" to
|
||||
the subdirectories of C:\MSYS\1.0\local.
|
||||
|
||||
|
||||
o Coin
|
||||
Get a source archive from www.coin3d.org. Unpack the sources and run
|
||||
|
||||
./confiure
|
||||
make
|
||||
make install
|
||||
|
||||
It may happen that a message dialog pops up due to a missing cygwin1.dll. You simply ignore this.
|
||||
|
||||
|
||||
o SoQt
|
||||
Get a source archive from www.coin3d.org. Unpack the sources and run
|
||||
|
||||
./configure CXXFLAGS="-DCOIN_DLL" --with-qt=/usr/local
|
||||
make
|
||||
make install
|
||||
|
||||
In case your Qt development files are not under /usr/local choose the correct directory there.
|
||||
Again a message dialog may pop up due to the missing cygwin1.dll.
|
||||
|
||||
|
||||
o PyQt/sip
|
||||
Download the sources archives for sip and PyQt4 from www.riverbankcomputing.co.uk.
|
||||
|
||||
In order to build sip extract the archive and open a MSYS command line. From within
|
||||
its source archive call
|
||||
|
||||
python configure.py --platform win32-g++ --destdir=/usr/local
|
||||
make
|
||||
|
||||
It may happen that this step aborts because the Python include headers cannot be found.
|
||||
In this case edit the Makefile and add the include path for the ython headers and also
|
||||
the path and filename of the Python library.
|
||||
|
||||
Unfortunately, the 'make install' command doesn't work because the Makefile was generated
|
||||
to use Windows batch commands instead of bash commands. Thus, copy the following files to
|
||||
a path where Python can find it, e.g. /usr/local/bin.
|
||||
|
||||
sipconfig.py
|
||||
sipdistutils.py
|
||||
siputils.py
|
||||
sip.pyd
|
||||
sip.exe
|
||||
|
||||
In order to build PyQt4 extract the source archive and open a MSYS command line. Go to the
|
||||
directory and start
|
||||
|
||||
export PATH=/usr/local/lib/:$PATH
|
||||
python configure.py --destdir=/usr/local/lib/site-packages
|
||||
make
|
||||
|
||||
Since the Makefile doesn't find the Python header files copy them all and also the file sip.h
|
||||
to a directory where they can be found. A good place seems to be the directory of the Qt sources.
|
||||
There copy the files to $QTDIR/include. The Python library file python26.dll.a can go $QTDIR/lib.
|
||||
|
||||
After the build has finished you have to copy all files that end with .pyd to their destination,
|
||||
e.g. /usr/local/lib/site-packages/PyQt4. Lateron when you have built the FreeCAD sources you have
|
||||
to copy the PyQt4 directory and sip.pyd to the FreeCAD bin directory or set a symlink.
|
||||
|
||||
|
||||
o ODE
|
||||
TODO: Still not clear if this will be used. (http://www.ode.org), >= 0.10.x
|
||||
|
||||
|
||||
o OpenCASCADE
|
||||
For the build of the OpenCASCADE libraries get the sources from www.opencascade.org or alternatively
|
||||
it is also possible to download a stripped source tarball from the Debian mirrors which don't include
|
||||
any fonts and other resource files.
|
||||
|
||||
Unpack the sources and download a CMake script from http://opencascade-cmake.googlecode.com/svn/trunk/
|
||||
and the file occ_config.h.cmake. Copy both files into the 'ros' directory, start cmake-gui from
|
||||
within a MSYS command line and select MSYS Makefiles. In the options the following switches can be
|
||||
disabled:
|
||||
|
||||
OPENCASCADE_WRAPPERS
|
||||
OPENCASCADE_VISUALISATION
|
||||
OPENCASCADE_OCAF
|
||||
OPENCASCADE_DRAW
|
||||
|
||||
Then specify for OPENCASCADE_INSTALL_PREFIX C:/MSYS/1.0/local as destination directory-
|
||||
|
||||
Now click the Configure button which takes a while and afterwards the Generate button.
|
||||
|
||||
Note: The original sources don't completely compile with MinGW. Therefore you have to apply the patch
|
||||
OpenCASCADE6.3.0-MinGW.patch from http://code.google.com/p/opencascade-cmake/source/browse/trunk
|
||||
|
||||
Note: The original sources includes also a configure script and the Makefile.am files.
|
||||
But it appeared to be very hard to build the libraries this way. Thus, it highly
|
||||
recommended to do it the CMake way.
|
||||
|
||||
Note: For a couple of libraries the arguments passed to the linker exceeds the number of
|
||||
allowed characters and thus the linker stops with an error: "Bad file number".
|
||||
To solve this issue you can open the file build.make of the according library and
|
||||
split the block (e.g. TKGeomAlgo_OBJECTS) into several smaller ones and modify the
|
||||
build rule this way that you create first a static library, add the other object
|
||||
files to the group and then unpack the static archive into one directory. This
|
||||
trick solves the problem to reduce the whole number of characters.
|
||||
Afterwards the shared library can be built out of these object files.
|
||||
Example:
|
||||
If the build.make file has a line of the form
|
||||
g++ <options> -shared -o libTKGeomAlgo.dll $(TKGeomAlgo_OBJECTS) <libs>
|
||||
then change it into
|
||||
ar rcs win32/libTKGeomAlgo.a $(TKGeomAlgo_OBJECTS1)
|
||||
ar q win32/libTKGeomAlgo.a $(TKGeomAlgo_OBJECTS2)
|
||||
...
|
||||
ar x win32/libTKGeomAlgo.a
|
||||
g++ <options> -shared -o libTKGeomAlgo.dll *.obj <libs>
|
||||
rm -f *.obj
|
||||
|
||||
|
||||
Building the FreeCAD sources
|
||||
----------------------------
|
||||
|
||||
In order build the FreeCAD sources either get the developer sources from the SVN repository
|
||||
or get one of the .tar.gz tarballs and extract it.
|
||||
Now start cmake-gui.exe from within a MSYS command line window and browse to the FreeCAD
|
||||
sources and also define the build directory. Now run Configure. It may happen that cmake
|
||||
complains about some not found libraries. In this case go through the listed libraries and
|
||||
choose the include directory and/or the path to the library where needed. Once Confgiure
|
||||
accepts all your input create the Makefiles by clicking on Generate. Now close the window
|
||||
and enter
|
||||
|
||||
make
|
||||
make install
|
||||
|
||||
This will take a couple of minutes. From the command line window change to the FreeCAD bin
|
||||
folder and start the application with ./FreeCAD. In case it complains about some DLLs it cannot
|
||||
find you have to extend your PATH environment variable with
|
||||
|
||||
export PATH=$PATH:/usr/local/bin:/usr/local/lib
|
||||
|
||||
If no grave problems remains repeating ./FreeCAD should start the application now.
|
||||
|
||||
Note: In order to let CMake detect the boost libraries you must make sure that the
|
||||
DLLs are in the system path because the check builds some test applications
|
||||
and tries to start them. If the DLLs are not in path CMake says that it cannot
|
||||
find boost. In this case do a export PATH=/usr/local/lib:$PATH
|
||||
|
||||
Have fun!
|
||||
@@ -0,0 +1,85 @@
|
||||
|
||||
How to build and run FreeCAD under Windows
|
||||
==========================================
|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
On Windows we use the IDE MS VisualStudio 9 with the highest service pack.
|
||||
In case you don't want to use MS products you can also use the MinGW compiler,
|
||||
alternatively. In this case continue on reading the manual README.MinGW.
|
||||
You need cMake 2.6 or higher to generate the project files for VisualStudio.
|
||||
Also you need all the 3rd party libraries to succsefully compile FreeCAD.
|
||||
|
||||
Using LibPack
|
||||
-------------
|
||||
|
||||
To make it easier to get FreeCAD compiled, we provide a collection of all
|
||||
needed libraries. It's called the LibPack. You can find it on the download
|
||||
page on sourceforge.
|
||||
|
||||
Python needed
|
||||
-------------
|
||||
|
||||
During the compilation some Python scripts get executed. So the Python interpreter
|
||||
has to function on the OS. Use a command box to check it. If the Python library is
|
||||
not properly installed you will get an error message like Cannot find python.exe.
|
||||
If you use the LibPack you can also use the python.exe in the bin directory.
|
||||
|
||||
Compile
|
||||
-------
|
||||
|
||||
In order to build the FreeCAD sources start the GUI frontend of cmake. If
|
||||
doesn't already find the header files and libraries of the LibPack you have to
|
||||
define the path where you have unpacked it.
|
||||
|
||||
After you conform to all prerequisites the compilation is - hopefully - only
|
||||
a mouse click in VC ;-)
|
||||
|
||||
After Compiling
|
||||
---------------
|
||||
|
||||
To get FreeCAD up and running from the compiler environment you need to move a
|
||||
few files from the LibPack to the "bin" folder where FreeCAD.exe is installed
|
||||
after a successfull build:
|
||||
|
||||
* python.exe and python_d.exe from LIBPACK/bin
|
||||
* python26.dll and python26_d.dll from LIBPACK/bin
|
||||
* python26.zip from LIBPACK/bin
|
||||
* make a copy of python26.zip and rename it to python26_d.zip
|
||||
|
||||
|
||||
Additional stuff
|
||||
----------------
|
||||
|
||||
If you want to build the source code documentation you need DoxyGen.
|
||||
To create an intstaller package you need WIX.
|
||||
|
||||
|
||||
Additional information on building special 3rd party libraries
|
||||
--------------------------------------------------------------
|
||||
|
||||
The addressed audience for this section is rather the developers
|
||||
themselves than those people who build the FreeCAD sources.
|
||||
|
||||
* Salome SMESH
|
||||
|
||||
The Salome SMESH library needs some special steps in order to be built
|
||||
because it contains some Fortran code.
|
||||
|
||||
1. First get the SMESH sources smesh-5.1.2.2.tar.gz from the Sourceforge download area
|
||||
2. Make sure that the IDE can find the boost header files
|
||||
3. Start compiling all the projects. The NETGENPlugin probably fails but this can simply
|
||||
be unloaded or removed because we don't need it.
|
||||
Except of MESFISTO2 all other projects should compile fine. For MEFISTO2 we get a couple
|
||||
of linker errors.
|
||||
4. Get the f2c utility from http://netlib.sandia.gov/f2c/mswin/index.html
|
||||
5. Get f2c.h from http://netlib.sandia.gov/f2c/f2c.h.gz
|
||||
6. Convert the Fortran file trte.f into a C file trte.c using the f2c utility
|
||||
7. Get the sources for the lib f2c from http://netlib.sandia.gov/f2c/libf2c.zip.
|
||||
Unpack the sources and add the compiler switch /MD to makefile.vc. This is needed to
|
||||
link against the shared C runtime, not the static one.
|
||||
8. Remove the __WATCOM__ define from the list of the preprocessor macros of the MESFISTO2
|
||||
project.
|
||||
9. Build the file vcf2c.lib with "nmake -f makefile.vc" and add it to the MEFISTO2 project as
|
||||
additional library. The linker errors should now go away.
|
||||
@@ -1,124 +0,0 @@
|
||||
<a href="https://freecad.org"><img src="https://www.freecad.org/svg/icon-freecad.svg" height="100px" width="100px"></a>
|
||||
|
||||
### Your own 3D parametric modeler
|
||||
|
||||
[Website](https://www.freecad.org) •
|
||||
[Documentation](https://wiki.freecad.org) •
|
||||
[Forum](https://forum.freecad.org/) •
|
||||
[Bug tracker](https://github.com/FreeCAD/FreeCAD/issues) •
|
||||
[Git repository](https://github.com/FreeCAD/FreeCAD) •
|
||||
[Blog](https://blog.freecad.org)
|
||||
|
||||
|
||||
[](https://github.com/freecad/freecad/releases/latest) [](https://crowdin.com/project/freecad) [](https://liberapay.com/FreeCAD)
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/1828501/174066870-1692005b-f8d7-43fb-a289-6d2f07f73d7f.png" width="800"/>
|
||||
|
||||
Overview
|
||||
--------
|
||||
|
||||
* **Freedom to build what you want** FreeCAD is an open-source parametric 3D
|
||||
modeler made primarily to design real-life objects of any size.
|
||||
Parametric modeling allows you to easily modify your design by going back into
|
||||
your model history to change its parameters.
|
||||
|
||||
* **Create 3D from 2D and back** FreeCAD lets you to sketch geometry constrained
|
||||
2D shapes and use them as a base to build other objects.
|
||||
It contains many components to adjust dimensions or extract design details from
|
||||
3D models to create high quality production-ready drawings.
|
||||
|
||||
* **Designed for your needs** FreeCAD is designed to fit a wide range of uses
|
||||
including product design, mechanical engineering and architecture,
|
||||
whether you are a hobbyist, programmer, experienced CAD user, student or teacher.
|
||||
|
||||
* **Cross platform** FreeCAD runs on Windows, macOS and Linux operating systems.
|
||||
|
||||
* **Underlying technology**
|
||||
* **OpenCASCADE** A powerful geometry kernel, the most important component of FreeCAD
|
||||
* **Coin3D library** Open Inventor-compliant 3D scene representation model
|
||||
* **Python** FreeCAD offers a broad Python API
|
||||
* **Qt** Graphical user interface built with Qt
|
||||
|
||||
|
||||
Installing
|
||||
----------
|
||||
|
||||
Precompiled packages for stable releases are available for Windows, macOS and Linux on the
|
||||
[Releases page](https://github.com/FreeCAD/FreeCAD/releases).
|
||||
|
||||
On most Linux distributions, FreeCAD is also directly installable from the
|
||||
software center application.
|
||||
|
||||
For development releases check the [weekly-builds page](https://github.com/FreeCAD/FreeCAD-Bundle/releases/tag/weekly-builds).
|
||||
|
||||
Other options are described at the [wiki Download page](https://wiki.freecad.org/Download).
|
||||
|
||||
Compiling
|
||||
---------
|
||||
|
||||
Compiling FreeCAD requires installation of several libraries and their
|
||||
development files such as OCCT (Open Cascade), Coin and Qt, listed in the
|
||||
pages below. Once this is done, FreeCAD can be compiled with
|
||||
CMake. On Windows, these libraries are bundled and offered by the
|
||||
FreeCAD team in a convenient package. On Linux, they are usually found
|
||||
in your distribution's repositories, and on macOS and other platforms,
|
||||
you will usually have to compile them yourself.
|
||||
|
||||
The pages below contain up-to-date build instructions:
|
||||
|
||||
- [Linux](https://wiki.freecad.org/Compile_on_Linux)
|
||||
- [Windows](https://wiki.freecad.org/Compile_on_Windows)
|
||||
- [macOS](https://wiki.freecad.org/Compile_on_MacOS)
|
||||
- [Cygwin](https://wiki.freecad.org/Compile_on_Cygwin)
|
||||
- [MinGW](https://wiki.freecad.org/Compile_on_MinGW)
|
||||
|
||||
|
||||
Reporting Issues
|
||||
---------
|
||||
|
||||
To report an issue please:
|
||||
|
||||
- First post to forum to verify the issue;
|
||||
- Link forum thread to bug tracker ticket and vice-a-versa;
|
||||
- Use the most updated stable or development versions of FreeCAD;
|
||||
- Post version info from eg. `Help > About FreeCAD > Copy to clipboard`;
|
||||
- Post a Step-By-Step explanation on how to recreate the issue;
|
||||
- Upload an example file to demonstrate problem.
|
||||
|
||||
For more detail see:
|
||||
|
||||
- [Bug Tracker](https://github.com/FreeCAD/FreeCAD/issues)
|
||||
- [Reporting Issues and Requesting Features](https://github.com/FreeCAD/FreeCAD/issues/new/choose)
|
||||
- [Contributing](https://github.com/FreeCAD/FreeCAD/blob/master/CONTRIBUTING.md)
|
||||
- [Help Forum](https://forum.freecad.org/viewforum.php?f=3)
|
||||
- [Developers Handbook](https://freecad.github.io/DevelopersHandbook/)
|
||||
|
||||
The [FPA](https://fpa.freecad.org) offers developers the opportunity
|
||||
to apply for a grant to work on projects of their choosing. Check
|
||||
[jobs and funding](https://blog.freecad.org/jobs/) to know more.
|
||||
|
||||
|
||||
Usage & Getting help
|
||||
--------------------
|
||||
|
||||
The FreeCAD wiki contains documentation on
|
||||
general FreeCAD usage, Python scripting, and development. These
|
||||
pages might help you get started:
|
||||
|
||||
- [Getting started](https://wiki.freecad.org/Getting_started)
|
||||
- [Features list](https://wiki.freecad.org/Feature_list)
|
||||
- [Frequent questions](https://wiki.freecad.org/FAQ/en)
|
||||
- [Workbenches](https://wiki.freecad.org/Workbenches)
|
||||
- [Scripting](https://wiki.freecad.org/Power_users_hub)
|
||||
- [Development](https://wiki.freecad.org/Developer_hub)
|
||||
|
||||
The [FreeCAD forum](https://forum.freecad.org) is also a great place
|
||||
to find help and solve specific problems you might encounter when
|
||||
learning to use FreeCAD.
|
||||
|
||||
|
||||
<p>This project receives generous infrastructure support from
|
||||
<a href="https://www.digitalocean.com/">
|
||||
<img src="https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/SVG/DO_Logo_horizontal_blue.svg" width="91px">
|
||||
</a> and <a href="https://www.kipro-pcb.com/">KiCad Services Corp.</a>
|
||||
</p>
|
||||
-32
@@ -1,32 +0,0 @@
|
||||
# Security Policy
|
||||
|
||||
The FreeCAD project is a FOSS (Free and Open-Source Software) project that has a community of thousands of users and
|
||||
hundreds of developers worldwide. We encourage responsible reporting of security vulnerabilities that may affect users
|
||||
of this software, and will endeavor to address these vulnerabilities when they are discovered.
|
||||
|
||||
## Bounties
|
||||
|
||||
FreeCAD does not have a program to pay bounties for security bugs. If you discover a vulnerability that affects a part
|
||||
of the FreeCAD project (either directly in FreeCAD, in a library it depends on, or in any of the various other
|
||||
subprojects such as our website, forums, etc.) we ask you to join the large community of volunteer contributors and
|
||||
file a report about the issue.
|
||||
|
||||
Note that funds may be available from the [FreeCAD Project Association (FPA)](https://fpa.freecad.org) to pursue
|
||||
security research and/or the development of fixes to any vulnerabilities discovered. However, vulnerabilities held as
|
||||
hostage in demands for "bounties" will not be entertained. Contact the FPA at fpa@freecad.org for more information.
|
||||
|
||||
## Supported Versions
|
||||
|
||||
FreeCAD implements security fixes to the current release series, and to the current development on the master branch.
|
||||
|
||||
| Version | Supported |
|
||||
|---------| ------------------ |
|
||||
| 0.21 | :white_check_mark: |
|
||||
| 0.20.2 | :white_check_mark: |
|
||||
| < 0.20 | :x: |
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
To report a vulnerability use GitHub's security reporting tool:
|
||||
https://github.com/FreeCAD/FreeCAD/security/advisories/new
|
||||
|
||||
+503
@@ -0,0 +1,503 @@
|
||||
dnl @synopsis AC_CXX_HAVE_STL
|
||||
dnl
|
||||
dnl If the compiler supports the Standard Template Library, define HAVE_STL.
|
||||
dnl
|
||||
dnl @version $Id: acinclude.m4,v 1.2 2006/02/24 00:09:19 wmayer Exp $
|
||||
dnl @author Luc Maisonobe
|
||||
dnl
|
||||
AC_DEFUN([AC_CXX_HAVE_STL],
|
||||
[AC_CACHE_CHECK(whether the compiler supports Standard Template Library,
|
||||
ac_cv_cxx_have_stl,
|
||||
[AC_REQUIRE([AC_CXX_NAMESPACES])
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
AC_TRY_COMPILE([#include <list>
|
||||
#include <deque>
|
||||
#ifdef HAVE_NAMESPACES
|
||||
using namespace std;
|
||||
#endif],[list<int> x; x.push_back(5);
|
||||
list<int>::iterator iter = x.begin(); if (iter != x.end()) ++iter; return 0;],
|
||||
ac_cv_cxx_have_stl=yes, ac_cv_cxx_have_stl=no)
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
if test "$ac_cv_cxx_have_stl" = yes; then
|
||||
AC_DEFINE(HAVE_STL,,[define if the compiler supports Standard Template Library])
|
||||
fi
|
||||
])
|
||||
dnl @synopsis AC_CXX_HAVE_STD
|
||||
dnl
|
||||
dnl If the compiler supports ISO C++ standard library (i.e., can include the
|
||||
dnl files iostream, map, iomanip and cmath}), define HAVE_STD.
|
||||
dnl
|
||||
dnl @version $Id: acinclude.m4,v 1.2 2006/02/24 00:09:19 wmayer Exp $
|
||||
dnl @author Luc Maisonobe
|
||||
dnl
|
||||
AC_DEFUN([AC_CXX_HAVE_STD],
|
||||
[AC_CACHE_CHECK(whether the compiler supports ISO C++ standard library,
|
||||
ac_cv_cxx_have_std,
|
||||
[AC_REQUIRE([AC_CXX_NAMESPACES])
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
AC_TRY_COMPILE([#include <iostream>
|
||||
#include <map>
|
||||
#include <iomanip>
|
||||
#include <cmath>
|
||||
#ifdef HAVE_NAMESPACES
|
||||
using namespace std;
|
||||
#endif],[return 0;],
|
||||
ac_cv_cxx_have_std=yes, ac_cv_cxx_have_std=no)
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
if test "$ac_cv_cxx_have_std" = yes; then
|
||||
AC_DEFINE(HAVE_STD,,[define if the compiler supports ISO C++ standard library])
|
||||
fi
|
||||
])
|
||||
dnl @synopsis AC_CXX_NAMESPACES
|
||||
dnl
|
||||
dnl If the compiler can prevent names clashes using namespaces, define
|
||||
dnl HAVE_NAMESPACES.
|
||||
dnl
|
||||
dnl @version $Id: acinclude.m4,v 1.2 2006/02/24 00:09:19 wmayer Exp $
|
||||
dnl @author Luc Maisonobe
|
||||
dnl
|
||||
AC_DEFUN([AC_CXX_NAMESPACES],
|
||||
[AC_CACHE_CHECK(whether the compiler implements namespaces,
|
||||
ac_cv_cxx_namespaces,
|
||||
[AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}],
|
||||
[using namespace Outer::Inner; return i;],
|
||||
ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no)
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
if test "$ac_cv_cxx_namespaces" = yes; then
|
||||
AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces])
|
||||
fi
|
||||
])
|
||||
dnl @synopsis AC_CXX_HAVE_SSTREAM
|
||||
dnl
|
||||
dnl If sstream (part of Standard C++ Library) exists
|
||||
dnl define HAVE_SSTREAM.
|
||||
dnl
|
||||
dnl @version ac_cxx_have_std.m4 Tue Mar 28 18:20:26 CEST 2000
|
||||
dnl @author Thomas Sondergaard thomass@deltadata.dk
|
||||
dnl
|
||||
AC_DEFUN([AC_CXX_HAVE_SSTREAM],
|
||||
[AC_CACHE_CHECK(for sstream,
|
||||
ac_cv_cxx_have_sstream,
|
||||
[AC_REQUIRE([AC_CXX_NAMESPACES])
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
AC_TRY_COMPILE([#include <sstream>
|
||||
#ifdef HAVE_NAMESPACES
|
||||
using namespace std;
|
||||
#endif],[return 0;],
|
||||
ac_cv_cxx_have_sstream=yes, ac_cv_cxx_have_sstream=no)
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
if test "$ac_cv_cxx_have_sstream" = yes; then
|
||||
AC_DEFINE(HAVE_SSTREAM,1,[define if the compiler supports sstream])
|
||||
fi
|
||||
])
|
||||
dnl @synopsis AC_CXX_HAVE_STD_IOSTREAM
|
||||
dnl
|
||||
dnl If std iostream (part of Standard C++ Library) exists
|
||||
dnl define HAVE_STD_IOSTREAM.
|
||||
dnl
|
||||
dnl @version ac_cxx_have_std.m4 Tue Mar 28 18:20:26 CEST 2000
|
||||
dnl @author Thomas Sondergaard thomass@deltadata.dk
|
||||
dnl
|
||||
AC_DEFUN([AC_CXX_HAVE_STD_IOSTREAM],
|
||||
[AC_CACHE_CHECK(for std iostream,
|
||||
ac_cv_cxx_have_std_iostream,
|
||||
[AC_REQUIRE([AC_CXX_NAMESPACES])
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
AC_TRY_COMPILE([
|
||||
#include <sstream>
|
||||
#include <streambuf>
|
||||
#include <ios>
|
||||
#ifdef HAVE_NAMESPACES
|
||||
using namespace std;
|
||||
#endif
|
||||
],[return 0;],
|
||||
ac_cv_cxx_have_std_iostream=yes, ac_cv_cxx_have_std_iostream=no)
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
if test "$ac_cv_cxx_have_std_iostream" = yes; then
|
||||
AC_DEFINE(HAVE_STD_IOSTREAM,,[define if the compiler has std compliant iostream library])
|
||||
fi
|
||||
])
|
||||
dnl @synopsis FREECAD_AC_HAVE_QT(MINIMUM_VERSION)
|
||||
dnl
|
||||
dnl @summary Search for Trolltech's Qt GUI framework.
|
||||
dnl
|
||||
dnl Checks for the Qt4 library and its tools uic, moc and rcc.
|
||||
dnl
|
||||
dnl The following variables are exported:
|
||||
dnl
|
||||
dnl QT_DIR
|
||||
dnl QT_CXXFLAGS
|
||||
dnl QT_LIBS
|
||||
dnl QT_MOC
|
||||
dnl QT_UIC
|
||||
dnl QT_RCC
|
||||
dnl
|
||||
AC_DEFUN([FREECAD_AC_HAVE_QT],
|
||||
[
|
||||
|
||||
AC_ARG_WITH([qt4-dir],
|
||||
AC_HELP_STRING([--with-qt4-dir=DIR], [give prefix location of Qt4]),
|
||||
[fc_qt4_dir="$withval"],
|
||||
[fc_qt4_dir="/usr/share/qt4"])
|
||||
|
||||
AC_ARG_WITH([qt4-include],
|
||||
AC_HELP_STRING([--with-qt4-include=DIR], [give include prefix of Qt4]),
|
||||
[fc_qt4_include="$withval"],
|
||||
[fc_qt4_include="$fc_qt4_dir/include"])
|
||||
|
||||
AC_ARG_WITH([qt4-lib],
|
||||
AC_HELP_STRING([--with-qt4-lib=DIR], [give library path to Qt4]),
|
||||
[fc_qt4_lib="$withval"],
|
||||
[fc_qt4_lib="$fc_qt4_dir/lib"])
|
||||
|
||||
AC_ARG_WITH([qt4-bin],
|
||||
AC_HELP_STRING([--with-qt4-bin=DIR], [give path to Qt4 utilities (moc, uic, rcc)]),
|
||||
[fc_qt4_bin="$withval"],
|
||||
[fc_qt4_bin="$fc_qt4_dir/bin"])
|
||||
|
||||
AC_ARG_WITH([qt4-framework],
|
||||
AC_HELP_STRING([--with-qt4-framework],
|
||||
[give prefix path to the Qt4 framework on Mac OS X]),
|
||||
[fc_qt4_frm="$withval"],
|
||||
[fc_qt4_frm=""])
|
||||
|
||||
AC_MSG_CHECKING(for host)
|
||||
AC_MSG_RESULT($host_os)
|
||||
case $host_os in
|
||||
mingw32*)
|
||||
fc_qt4_lib_core="-L$fc_qt4_lib -lQtCore"
|
||||
QT_LIBS="-L$fc_qt4_lib -lopengl32 -lglu32 -lgdi32 -luser32 -lmingw32 -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -Wl,-s -Wl,-subsystem,windows"
|
||||
QT_CXXFLAGS="-I$fc_qt4_include -I$fc_qt4_include/QtCore -I$fc_qt4_include/QtGui -I$fc_qt4_include/QtOpenGL -I$fc_qt4_include/QtSvg -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -frtti -fexceptions"
|
||||
;;
|
||||
darwin*)
|
||||
AC_PATH_XTRA
|
||||
if test -d $fc_qt4_frm/QtCore.framework; then
|
||||
ac_save_ldflags_fw=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -F$fc_qt4_frm -framework QtCore"
|
||||
AC_CACHE_CHECK(
|
||||
[whether Qt is installed as framework],
|
||||
ac_cv_have_qt_framework,
|
||||
[AC_TRY_LINK([#include <QtCore/qglobal.h>
|
||||
#include <stdio.h>],
|
||||
[printf("%s\n", qVersion());],
|
||||
[ac_cv_have_qt_framework=yes],
|
||||
[ac_cv_have_qt_framework=no])
|
||||
])
|
||||
LDFLAGS=$ac_save_ldflags_fw
|
||||
else
|
||||
ac_cv_have_qt_framework=no
|
||||
fi
|
||||
if test "$ac_cv_have_qt_framework" = yes; then
|
||||
# Qt as framework installed
|
||||
fc_qt4_lib_core="-Wl,-F$fc_qt4_frm -Wl,-framework,QtCore"
|
||||
QT_LIBS="-Wl,-F$fc_qt4_frm"
|
||||
#QT_LIBS="$QT_LIBS -Wl,-framework,Qt3Support"
|
||||
QT_LIBS="$QT_LIBS -Wl,-framework,QtGui"
|
||||
QT_LIBS="$QT_LIBS -Wl,-framework,QtOpenGL"
|
||||
QT_LIBS="$QT_LIBS -Wl,-framework,QtCore"
|
||||
QT_LIBS="$QT_LIBS -Wl,-framework,QtNetwork"
|
||||
QT_LIBS="$QT_LIBS -Wl,-framework,QtXml"
|
||||
QT_LIBS="$QT_LIBS -Wl,-framework,QtSql"
|
||||
QT_LIBS="$QT_LIBS -Wl,-framework,QtSvg"
|
||||
# Separated libs
|
||||
QT4_CORE_LIBS="-Wl,-F$fc_qt4_frm -Wl,-framework,QtCore"
|
||||
|
||||
QT_CXXFLAGS="-F$fc_qt4_frm -I$fc_qt4_frm/Qt3Support.framework/Headers"
|
||||
QT_CXXFLAGS="$QT_CXXFLAGS -I$fc_qt4_frm/QtGui.framework/Headers"
|
||||
QT_CXXFLAGS="$QT_CXXFLAGS -I$fc_qt4_frm/QtCore.framework/Headers"
|
||||
QT_CXXFLAGS="$QT_CXXFLAGS -I$fc_qt4_frm/QtOpenGL.framework/Headers"
|
||||
QT_CXXFLAGS="$QT_CXXFLAGS -I$fc_qt4_frm/QtNetwork.framework/Headers"
|
||||
QT_CXXFLAGS="$QT_CXXFLAGS -I$fc_qt4_frm/QtSvg.framework/Headers"
|
||||
QT_CXXFLAGS="$QT_CXXFLAGS -I$fc_qt4_frm/QtXml.framework/Headers"
|
||||
QT_CXXFLAGS="$QT_CXXFLAGS -I$fc_qt4_frm/QtUiTools.framework/Headers"
|
||||
# Separated flags
|
||||
QT4_CORE_CXXFLAGS="-F$fc_qt4_frm -I$fc_qt4_frm/QtCore.framework/Headers"
|
||||
# QtUiTools doesn't seem to be available as framework
|
||||
#QT_CXXFLAGS="$QT_CXXFLAGS -I/usr/include/QtUiTools"
|
||||
# QtWebKit check
|
||||
fc_ac_save_cppflags=$CPPFLAGS
|
||||
CPPFLAGS="$QT_CXXFLAGS -I$fc_qt4_frm/QtWebKit.framework/Headers"
|
||||
AC_MSG_CHECKING([whether QtWebKit is available])
|
||||
AC_TRY_COMPILE([#include <QWebView>], [],
|
||||
[
|
||||
QT_CXXFLAGS="$QT_CXXFLAGS -I$fc_qt4_frm/QtWebKit.framework/Headers"
|
||||
QT_LIBS="$QT_LIBS -Wl,-framework,QtWebKit"
|
||||
AC_MSG_RESULT(yes)],
|
||||
AC_MSG_RESULT(no))
|
||||
CPPFLAGS=$fc_ac_save_cppflags
|
||||
else
|
||||
# Qt not as framework installed
|
||||
fc_qt4_lib_core="-L$fc_qt4_lib -lQtCore"
|
||||
QT_LIBS="-L$fc_qt4_lib -lQtCore -lQtGui -lQt3Support -lQtNetwork -lQtOpenGL -lQtSvg -lQtXml"
|
||||
QT_CXXFLAGS="-I$fc_qt4_include -I$fc_qt4_include/Qt3Support"
|
||||
QT_CXXFLAGS="$QT_CXXFLAGS -I$fc_qt4_include/QtGui"
|
||||
QT_CXXFLAGS="$QT_CXXFLAGS -I$fc_qt4_include/QtCore"
|
||||
QT_CXXFLAGS="$QT_CXXFLAGS -I$fc_qt4_include/QtOpenGL"
|
||||
QT_CXXFLAGS="$QT_CXXFLAGS -I$fc_qt4_include/QtNetwork"
|
||||
QT_CXXFLAGS="$QT_CXXFLAGS -I$fc_qt4_include/QtSvg"
|
||||
QT_CXXFLAGS="$QT_CXXFLAGS -I$fc_qt4_include/QtXml"
|
||||
QT_CXXFLAGS="$QT_CXXFLAGS -I$fc_qt4_include/QtUiTools"
|
||||
# Separated flags and libs
|
||||
QT4_CORE_CXXFLAGS="-I$fc_qt4_include -I$fc_qt4_include/QtCore"
|
||||
QT4_CORE_LIBS="-L$fc_qt4_lib -lQtCore"
|
||||
# QtWebKit check
|
||||
fc_ac_save_cppflags=$CPPFLAGS
|
||||
CPPFLAGS="$QT_CXXFLAGS -I$fc_qt4_include/QtWebKit"
|
||||
AC_MSG_CHECKING([whether QtWebKit is available])
|
||||
AC_TRY_COMPILE([#include <QWebView>], [],
|
||||
[
|
||||
QT_CXXFLAGS="$QT_CXXFLAGS -I$fc_qt4_include/QtWebKit"
|
||||
QT_LIBS="$QT_LIBS -lQtWebKit"
|
||||
AC_MSG_RESULT(yes)],
|
||||
AC_MSG_RESULT(no))
|
||||
CPPFLAGS=$fc_ac_save_cppflags
|
||||
fi
|
||||
;;
|
||||
*) # UNIX/Linux based
|
||||
AC_PATH_XTRA
|
||||
fc_qt4_lib_core="-L$fc_qt4_lib -lQtCore"
|
||||
QT_LIBS="-L$fc_qt4_lib -lQtCore -lQtGui -lQt3Support -lQtNetwork -lQtOpenGL -lQtSvg -lQtXml $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS"
|
||||
QT_CXXFLAGS="-I$fc_qt4_include -I$fc_qt4_include/Qt3Support"
|
||||
QT_CXXFLAGS="$QT_CXXFLAGS -I$fc_qt4_include/QtGui"
|
||||
QT_CXXFLAGS="$QT_CXXFLAGS -I$fc_qt4_include/QtCore"
|
||||
QT_CXXFLAGS="$QT_CXXFLAGS -I$fc_qt4_include/QtOpenGL"
|
||||
QT_CXXFLAGS="$QT_CXXFLAGS -I$fc_qt4_include/QtNetwork"
|
||||
QT_CXXFLAGS="$QT_CXXFLAGS -I$fc_qt4_include/QtSvg"
|
||||
QT_CXXFLAGS="$QT_CXXFLAGS -I$fc_qt4_include/QtXml"
|
||||
QT_CXXFLAGS="$QT_CXXFLAGS -I$fc_qt4_include/QtUiTools $X_CFLAGS"
|
||||
# QtWebKit check
|
||||
fc_ac_save_cppflags=$CPPFLAGS
|
||||
CPPFLAGS="-I$fc_qt4_include -I$fc_qt4_include/QtWebKit"
|
||||
AC_MSG_CHECKING([whether QtWebKit is available])
|
||||
AC_TRY_LINK([#include <QWebView>], [],
|
||||
[
|
||||
QT_CXXFLAGS="$QT_CXXFLAGS -I$fc_qt4_include/QtWebKit"
|
||||
QT_LIBS="$QT_LIBS -lQtWebKit"
|
||||
AC_MSG_RESULT(yes)],
|
||||
AC_MSG_RESULT(no))
|
||||
CPPFLAGS=$fc_ac_save_cppflags
|
||||
#QT4_CXXFLAGS="-I$fc_qt4_include"
|
||||
#QT4_LIBS="-L$fc_qt4_lib $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS"
|
||||
# Separated flags and libs
|
||||
QT4_CORE_CXXFLAGS="-I$fc_qt4_include -I$fc_qt4_include/QtCore"
|
||||
QT4_CORE_LIBS="-L$fc_qt4_lib -lQtCore"
|
||||
#QT4_GUI_CXXFLAGS="-I$fc_qt4_include/QtGui"
|
||||
#QT4_GUI_LIBS="-lQtGui"
|
||||
#QT4_NETWORK_CFLAGS="-I$fc_qt4_include/QtNetwork"
|
||||
#QT4_NETWORK_LIBS="-lQtNetwork"
|
||||
#QT4_XML_CFLAGS="-I$fc_qt4_include/QtXml"
|
||||
#QT4_XML_LIBS="-lQtXml"
|
||||
;;
|
||||
esac
|
||||
|
||||
min_qt_version=ifelse([$1], ,4.0.0, $1)
|
||||
|
||||
AC_MSG_CHECKING(for Qt >= $min_qt_version)
|
||||
QT_MOC="$fc_qt4_bin/moc"
|
||||
QT_UIC="$fc_qt4_bin/uic"
|
||||
QT_RCC="$fc_qt4_bin/rcc"
|
||||
|
||||
# Now we check whether we can actually build a Qt app.
|
||||
cat > myqt.h << EOF
|
||||
#include <QObject>
|
||||
class Test : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Test() {}
|
||||
~Test() {}
|
||||
public slots:
|
||||
void receive() {}
|
||||
signals:
|
||||
void send();
|
||||
};
|
||||
EOF
|
||||
|
||||
cat > myqt.cpp << EOF
|
||||
#include "myqt.h"
|
||||
#include <QCoreApplication>
|
||||
#include <QByteArray>
|
||||
#include <QGlobalStatic>
|
||||
#include <QStringList>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
int main( int argc, char **argv )
|
||||
{
|
||||
QCoreApplication app( argc, argv );
|
||||
Test t;
|
||||
QObject::connect( &t, SIGNAL(send()), &t, SLOT(receive()) );
|
||||
|
||||
// major, minor, patch
|
||||
QString version = "$min_qt_version";
|
||||
QStringList numbers = version.split('.');
|
||||
|
||||
int shift[[3]] = {16,8,0};
|
||||
int minversion = 0, i = 0;
|
||||
for (QStringList::ConstIterator it = numbers.begin(); it != numbers.end(); ++it, ++i) {
|
||||
bool ok;
|
||||
int val = (*it).toInt(&ok);
|
||||
if (ok) {
|
||||
minversion = minversion + (val << shift[[i]]);
|
||||
}
|
||||
}
|
||||
|
||||
exit(QT_VERSION < minversion);
|
||||
}
|
||||
EOF
|
||||
|
||||
bnv_try_1="$QT_MOC myqt.h -o moc_myqt.cpp"
|
||||
AC_TRY_EVAL(bnv_try_1)
|
||||
if test x"$ac_status" != x0; then
|
||||
AC_MSG_ERROR([Cannot find Qt meta object compiler (moc), bye...])
|
||||
fi
|
||||
|
||||
bnv_try_2="$CXX $QT_CXXFLAGS -c $CXXFLAGS -o moc_myqt.o moc_myqt.cpp"
|
||||
AC_TRY_EVAL(bnv_try_2)
|
||||
if test x"$ac_status" != x0; then
|
||||
AC_MSG_ERROR([Failed to compile source file created by Qt meta object compiler (moc), bye...])
|
||||
fi
|
||||
|
||||
bnv_try_3="$CXX $QT_CXXFLAGS -c $CXXFLAGS -o myqt.o myqt.cpp"
|
||||
AC_TRY_EVAL(bnv_try_3)
|
||||
if test x"$ac_status" != x0; then
|
||||
AC_MSG_ERROR([Failed to compile Qt test app, bye...])
|
||||
fi
|
||||
|
||||
# Make sure not to link against X11 libs so that configure succeeds whithout xserver started
|
||||
bnv_try_4="$CXX myqt.o moc_myqt.o $fc_qt4_lib_core $LIBS -o myqt"
|
||||
AC_TRY_EVAL(bnv_try_4)
|
||||
if test x"$ac_status" != x0; then
|
||||
AC_MSG_ERROR([Failed to link with Qt, bye...])
|
||||
fi
|
||||
|
||||
AS_IF([AM_RUN_LOG([./myqt])],
|
||||
[AC_MSG_RESULT(yes)],
|
||||
[AC_MSG_ERROR([Version of Qt4 found but < $min_qt_version])
|
||||
])
|
||||
|
||||
rm -f moc_myqt.cpp myqt.h myqt.cpp myqt.o myqt moc_myqt.o
|
||||
|
||||
if test -d $fc_qt4_dir; then
|
||||
QT_DIR="$fc_qt4_dir"
|
||||
else
|
||||
QT_DIR=""
|
||||
fi
|
||||
|
||||
AC_SUBST(QT_DIR)
|
||||
AC_SUBST(QT_CXXFLAGS)
|
||||
AC_SUBST(QT_LIBS)
|
||||
AC_SUBST(QT4_CORE_CXXFLAGS)
|
||||
AC_SUBST(QT4_CORE_LIBS)
|
||||
AC_SUBST(QT_UIC)
|
||||
AC_SUBST(QT_MOC)
|
||||
AC_SUBST(QT_RCC)
|
||||
])
|
||||
dnl @synopsis FREECAD_AC_HAVE_BOOST
|
||||
dnl
|
||||
dnl @summary Search for boost header and library files.
|
||||
dnl
|
||||
dnl
|
||||
AC_DEFUN([FREECAD_AC_HAVE_BOOST],
|
||||
[
|
||||
AC_MSG_CHECKING(for boost)
|
||||
|
||||
AC_ARG_WITH(boost-include,
|
||||
AC_HELP_STRING([--with-boost-include=DIR], [Path to the boost header files]),
|
||||
[fc_boost_incs=$withval], [fc_boost_incs=/usr/include])
|
||||
|
||||
AC_ARG_WITH(boost-lib,
|
||||
AC_HELP_STRING([--with-boost-lib=DIR], [Path to the boost library files]),
|
||||
[fc_boost_libs=$withval], [fc_boost_libs=/usr/lib])
|
||||
|
||||
fc_boost_ac_save_cppflags=$CPPFLAGS
|
||||
fc_boost_ac_save_ldflags=$LDFLAGS
|
||||
fc_boost_ac_save_libs=$LIBS
|
||||
CPPFLAGS="$CPPFLAGS -I$fc_boost_incs"
|
||||
LDFLAGS="$LDFLAGS -L$fc_boost_libs"
|
||||
LIBS="-lboost_program_options-mt"
|
||||
|
||||
AC_TRY_LINK([#include <boost/program_options.hpp>],
|
||||
[namespace po = boost::program_options;
|
||||
po::options_description generic("Generic options");
|
||||
generic.add_options()
|
||||
("version,v", "print version string")
|
||||
("help", "produce help message");
|
||||
],
|
||||
[AC_MSG_RESULT(yes)],
|
||||
[AC_MSG_ERROR(failed)])
|
||||
|
||||
|
||||
|
||||
AC_MSG_CHECKING(for boost >= 1.35.0)
|
||||
|
||||
cat > boost.cpp << EOF
|
||||
#include <boost/version.hpp>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
exit(BOOST_VERSION >= 103500);
|
||||
}
|
||||
EOF
|
||||
|
||||
# Depending on boost version decide if boost_system is required
|
||||
boost_try="$CXX boost.cpp $CPPFLAGS -o boost"
|
||||
AC_TRY_EVAL(boost_try)
|
||||
if test x"$ac_status" != x0; then
|
||||
AC_MSG_ERROR([Failed to get version of boost, bye...])
|
||||
fi
|
||||
|
||||
AS_IF([AM_RUN_LOG([./boost])],
|
||||
[ac_cv_boost_system=no],
|
||||
[ac_cv_boost_system=yes
|
||||
])
|
||||
AC_MSG_RESULT($ac_cv_boost_system)
|
||||
rm -f boost.cpp boost
|
||||
|
||||
BOOST_FILESYSTEM_LIB="-lboost_filesystem-mt"
|
||||
BOOST_PROGOPTIONS_LIB="-lboost_program_options-mt"
|
||||
BOOST_SIGNALS_LIB="-lboost_signals-mt"
|
||||
BOOST_SYSTEM_LIB=""
|
||||
BOOST_REGEX_LIB="-lboost_regex-mt"
|
||||
if test x"$ac_cv_boost_system" = xyes; then
|
||||
LIBS="-lboost_system-mt"
|
||||
AC_MSG_CHECKING(for boost system library)
|
||||
AC_TRY_LINK([#include <boost/system/error_code.hpp>],
|
||||
[ boost::system::error_code error_code; std::string message(error_code.message()); return 0; ],
|
||||
[BOOST_SYSTEM_LIB="-lboost_system-mt"],
|
||||
[BOOST_SYSTEM_LIB=""])
|
||||
|
||||
if test "x$BOOST_SYSTEM_LIB" = "x"; then
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_ERROR(Unable to link with the boost::system library)
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(BOOST_FILESYSTEM_LIB)
|
||||
AC_SUBST(BOOST_PROGOPTIONS_LIB)
|
||||
AC_SUBST(BOOST_SIGNALS_LIB)
|
||||
AC_SUBST(BOOST_SYSTEM_LIB)
|
||||
AC_SUBST(BOOST_REGEX_LIB)
|
||||
|
||||
|
||||
CPPFLAGS=$fc_boost_ac_save_cppflags
|
||||
LDFLAGS=$fc_boost_ac_save_ldflags
|
||||
LIBS=$fc_boost_ac_save_libs
|
||||
|
||||
all_includes="$all_includes -I$fc_boost_incs"
|
||||
all_libraries="$all_libraries -L$fc_boost_libs"
|
||||
])
|
||||
Executable
+69
@@ -0,0 +1,69 @@
|
||||
#!/bin/bash
|
||||
# autogen.sh
|
||||
# Run this script to generate all initial makefiles.
|
||||
|
||||
# Get version and revision number
|
||||
MAJ=0
|
||||
MIN=13
|
||||
REV=0
|
||||
|
||||
#if svn --xml info >/dev/null 2>&1; then
|
||||
# REV=`svn --xml info | tr -d '\r\n' | sed -e 's/.*<commit.*revision="\([0-9]*\)".*<\/commit>.*/\1/'`
|
||||
#elif svn --version --quiet >/dev/null 2>&1; then
|
||||
# REV=`svn info | grep "^Revision:" | cut -d" " -f2`
|
||||
#fi
|
||||
# count all lines that don't match this string
|
||||
REV=`git rev-list HEAD | grep -cv "*"`
|
||||
|
||||
# if revision.m4 does not exist, create it
|
||||
REV_FILE=revision.m4
|
||||
#if [ -f $REV_FILE ]; then
|
||||
# echo "$REV_FILE found"
|
||||
#else
|
||||
# echo "m4_define([FREECAD_MAJOR], $MAJ)" > $REV_FILE
|
||||
# echo "m4_define([FREECAD_MINOR], $MIN)" >> $REV_FILE
|
||||
# echo "m4_define([FREECAD_MICRO], $REV)" >> $REV_FILE
|
||||
# echo "$REV_FILE created"
|
||||
#fi
|
||||
echo "m4_define([FREECAD_MAJOR], $MAJ)" > $REV_FILE
|
||||
echo "m4_define([FREECAD_MINOR], $MIN)" >> $REV_FILE
|
||||
echo "m4_define([FREECAD_MICRO], $REV)" >> $REV_FILE
|
||||
|
||||
# create m4 subdirectory which fails for some older versions of autotools
|
||||
[ -d m4 ] || mkdir m4
|
||||
|
||||
if which glibtoolize > /dev/null 2>&1; then
|
||||
echo "calling glibtoolize"
|
||||
glibtoolize --force --copy
|
||||
elif which libtoolize > /dev/null 2>&1; then
|
||||
echo "calling libtoolize"
|
||||
libtoolize --force --copy
|
||||
else
|
||||
echo "can't find libtoolize or glibtoolize"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# http://www.gnu.org/software/hello/manual/automake/Macro-Search-Path.html
|
||||
if [ -d /usr/local/share/aclocal ]; then
|
||||
echo "calling aclocal -I /usr/local/share/aclocal"
|
||||
aclocal -I /usr/local/share/aclocal
|
||||
else
|
||||
echo "calling aclocal"
|
||||
aclocal
|
||||
fi
|
||||
|
||||
echo "calling autoheader"
|
||||
autoheader
|
||||
|
||||
echo "calling automake"
|
||||
automake --add-missing --copy
|
||||
|
||||
echo "calling autoconf"
|
||||
autoconf
|
||||
|
||||
echo "Done"
|
||||
echo "Please run configure."
|
||||
|
||||
# touch file to update Version.h
|
||||
touch src/Build/Version.h.in
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
#! /bin/sh
|
||||
|
||||
# We almost need to specify the switches for the OpenCascade library to make
|
||||
# configure running successfully.
|
||||
# CASROOT=${CASROOT:-/opt/OpenCASCADE6.2.0/ros}
|
||||
#./configure CXXFLAGS="-fno-strict-aliasing" LDFLAGS="-Wl,-z,defs" --with-occ-include=$CASROOT/inc --with-occ-lib=$CASROOT/Linux/lib
|
||||
./configure CXXFLAGS="-fno-strict-aliasing -Wno-write-strings" LDFLAGS="-Wl,-z,defs"
|
||||
|
||||
@@ -63,23 +63,3 @@ SET(HAVE_QT_KEYPAD_DEFINE 1)
|
||||
SET(HAVE_QWIDGET_SHOWFULLSCREEN 1)
|
||||
|
||||
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/backtrace.cpp
|
||||
"#include <cstddef>\n"
|
||||
"#include <execinfo.h>\n\n"
|
||||
"int main() {\n"
|
||||
" void *callstack[128];\n"
|
||||
" size_t nMaxFrames = sizeof(callstack) / sizeof(callstack[0]);\n"
|
||||
" size_t nFrames = backtrace(callstack, nMaxFrames);\n"
|
||||
" char **symbols = backtrace_symbols(callstack, nFrames);\n"
|
||||
" return 0;\n"
|
||||
"}"
|
||||
)
|
||||
|
||||
try_compile(
|
||||
RESULT_VAR
|
||||
${CMAKE_BINARY_DIR}
|
||||
SOURCES
|
||||
${CMAKE_BINARY_DIR}/backtrace.cpp
|
||||
)
|
||||
|
||||
SET(HAVE_BACKTRACE_SYMBOLS ${RESULT_VAR})
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
# Try to find Coin3D
|
||||
# Once done this will define
|
||||
#
|
||||
# COIN3D_FOUND - system has Coin3D - Open Inventor
|
||||
# COIN3D_INCLUDE_DIR - where the Inventor include directory can be found
|
||||
# COIN3D_LIBRARY - Link this to use Coin3D
|
||||
#
|
||||
|
||||
|
||||
IF (WIN32)
|
||||
IF (CYGWIN)
|
||||
|
||||
FIND_PATH(COIN3D_INCLUDE_DIR Inventor/So.h
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(COIN3D_LIBRARY Coin
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
)
|
||||
|
||||
ELSE (CYGWIN)
|
||||
|
||||
FIND_PATH(COIN3D_INCLUDE_DIR Inventor/So.h
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\Coin3D\\2;Installation Path]/include"
|
||||
)
|
||||
|
||||
FIND_LIBRARY(COIN3D_LIBRARY_DEBUG coin2d
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\Coin3D\\2;Installation Path]/lib"
|
||||
)
|
||||
|
||||
FIND_LIBRARY(COIN3D_LIBRARY_RELEASE coin2
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\Coin3D\\2;Installation Path]/lib"
|
||||
)
|
||||
|
||||
IF (COIN3D_LIBRARY_DEBUG AND COIN3D_LIBRARY_RELEASE)
|
||||
SET(COIN3D_LIBRARY optimized ${COIN3D_LIBRARY_RELEASE}
|
||||
debug ${COIN3D_LIBRARY_DEBUG})
|
||||
ELSE (COIN3D_LIBRARY_DEBUG AND COIN3D_LIBRARY_RELEASE)
|
||||
IF (COIN3D_LIBRARY_DEBUG)
|
||||
SET (COIN3D_LIBRARY ${COIN3D_LIBRARY_DEBUG})
|
||||
ENDIF (COIN3D_LIBRARY_DEBUG)
|
||||
IF (COIN3D_LIBRARY_RELEASE)
|
||||
SET (COIN3D_LIBRARY ${COIN3D_LIBRARY_RELEASE})
|
||||
ENDIF (COIN3D_LIBRARY_RELEASE)
|
||||
ENDIF (COIN3D_LIBRARY_DEBUG AND COIN3D_LIBRARY_RELEASE)
|
||||
|
||||
IF (COIN3D_LIBRARY)
|
||||
# ADD_DEFINITIONS ( -DCOIN_NOT_DLL )
|
||||
#ELSE (COIN3D_LIBRARY)
|
||||
# SET (COIN3D_LIBRARY coin2d CACHE STRING "Coin3D Library (Debug) - Open Inventor API")
|
||||
ENDIF (COIN3D_LIBRARY)
|
||||
|
||||
ENDIF (CYGWIN)
|
||||
|
||||
ELSE (WIN32)
|
||||
IF(APPLE)
|
||||
FIND_PATH(COIN3D_INCLUDE_DIR Inventor/So.h
|
||||
/Library/Frameworks/Inventor.framework/Headers
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
)
|
||||
FIND_LIBRARY(COIN3D_LIBRARY Coin
|
||||
/Library/Frameworks/Inventor.framework/Libraries
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
)
|
||||
SET(COIN3D_LIBRARY "-framework Coin3d" CACHE STRING "Coin3D library for OSX")
|
||||
ELSE(APPLE)
|
||||
|
||||
FIND_PATH(COIN3D_INCLUDE_DIR Inventor/So.h
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(COIN3D_LIBRARY Coin
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
PATH_SUFFIXES Coin2 Coin3
|
||||
)
|
||||
ENDIF(APPLE)
|
||||
|
||||
ENDIF (WIN32)
|
||||
|
||||
|
||||
SET( COIN3D_FOUND "NO" )
|
||||
IF(COIN3D_LIBRARY)
|
||||
SET( COIN3D_FOUND "YES" )
|
||||
ENDIF(COIN3D_LIBRARY)
|
||||
|
||||
+27
-10
@@ -21,21 +21,19 @@ IF (COIN3D_FOUND)
|
||||
ELSE(APPLE)
|
||||
# Unix systems
|
||||
find_path(COIN3D_DOC_PATH index.html
|
||||
/usr/share/doc/libcoin80-doc/html
|
||||
/usr/share/doc/coin/html
|
||||
/usr/share/doc/Coin/html
|
||||
/usr/share/doc/libcoin60-doc/html
|
||||
)
|
||||
IF( EXISTS ${COIN3D_DOC_PATH})
|
||||
message(STATUS "Coin3D doc is installed")
|
||||
find_file(COIN3D_DOC_TAGFILE NAMES coin.tag Coin.tag
|
||||
PATHS ${COIN3D_DOC_PATH}
|
||||
find_file(COIN3D_DOC_TAGFILE coin.tag
|
||||
${COIN3D_DOC_PATH}
|
||||
)
|
||||
IF( EXISTS ${COIN3D_DOC_TAGFILE})
|
||||
SET( COIN3D_DOC_FOUND "YES"
|
||||
)
|
||||
ELSE( EXISTS ${COIN3D_DOC_TAGFILE})
|
||||
find_file(COIN3D_DOC_TAGFILE_GZ NAMES coin.tag.gz Coin.tag.gz
|
||||
PATHS ${COIN3D_DOC_PATH}
|
||||
find_file(COIN3D_DOC_TAGFILE_GZ coin.tag.gz
|
||||
${COIN3D_DOC_PATH}
|
||||
)
|
||||
IF( EXISTS ${COIN3D_DOC_TAGFILE_GZ})
|
||||
message(STATUS " Found ${COIN3D_DOC_TAGFILE_GZ}")
|
||||
@@ -54,8 +52,28 @@ IF (COIN3D_FOUND)
|
||||
${CMAKE_BINARY_DIR}/src/Doc
|
||||
)
|
||||
IF( EXISTS ${COIN3D_DOC_TAGFILE})
|
||||
SET( COIN3D_DOC_FOUND "YES" )
|
||||
SET( COIN3D_DOC_FOUND "YES"
|
||||
)
|
||||
ELSE( EXISTS ${COIN3D_DOC_TAGFILE})
|
||||
find_program(WGET_PROG wget
|
||||
)
|
||||
IF( EXISTS ${WGET_PROG})
|
||||
execute_process(COMMAND ${WGET_PROG}
|
||||
-P ${CMAKE_BINARY_DIR}/src/Doc
|
||||
${COIN3D_DOC_PATH}/coin.tag
|
||||
)
|
||||
find_file(COIN3D_DOC_TAGFILE coin.tag
|
||||
${CMAKE_BINARY_DIR}/src/Doc
|
||||
)
|
||||
IF( EXISTS ${COIN3D_DOC_TAGFILE})
|
||||
SET( COIN3D_DOC_FOUND "YES"
|
||||
)
|
||||
ENDIF( EXISTS ${COIN3D_DOC_TAGFILE})
|
||||
|
||||
ENDIF( EXISTS ${WGET_PROG})
|
||||
|
||||
ENDIF( EXISTS ${COIN3D_DOC_TAGFILE})
|
||||
|
||||
ENDIF( EXISTS ${COIN3D_DOC_PATH})
|
||||
ENDIF(APPLE)
|
||||
ENDIF(WIN32)
|
||||
@@ -66,5 +84,4 @@ if(COIN3D_DOC_FOUND)
|
||||
message(STATUS " Location: ${COIN3D_DOC_PATH}")
|
||||
endif(COIN3D_DOC_FOUND)
|
||||
|
||||
# export for others
|
||||
SET( COIN3D_DOC_FOUND "${COIN3D_DOC_FOUND}" CACHE BOOL "Coin3d documentation available")
|
||||
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
# - Try to find Eigen2 lib
|
||||
# Once done this will define
|
||||
#
|
||||
# EIGEN2_FOUND - system has eigen lib with correct version
|
||||
# EIGEN2_INCLUDE_DIR - the eigen include directory
|
||||
# EIGEN2_VERSION - eigen version
|
||||
|
||||
# Copyright (c) 2006, 2007 Montel Laurent, <montel@kde.org>
|
||||
# Copyright (c) 2008, 2009 Gael Guennebaud, <g.gael@free.fr>
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
|
||||
if(NOT EIGEN2_MIN_VERSION)
|
||||
if(NOT Eigen2_FIND_VERSION_MAJOR)
|
||||
set(Eigen2_FIND_VERSION_MAJOR 2)
|
||||
endif(NOT Eigen2_FIND_VERSION_MAJOR)
|
||||
if(NOT Eigen2_FIND_VERSION_MINOR)
|
||||
set(Eigen2_FIND_VERSION_MINOR 0)
|
||||
endif(NOT Eigen2_FIND_VERSION_MINOR)
|
||||
if(NOT Eigen2_FIND_VERSION_PATCH)
|
||||
set(Eigen2_FIND_VERSION_PATCH 0)
|
||||
endif(NOT Eigen2_FIND_VERSION_PATCH)
|
||||
|
||||
set(EIGEN2_MIN_VERSION "${Eigen2_FIND_VERSION_MAJOR}.${Eigen2_FIND_VERSION_MINOR}.${Eigen2_FIND_VERSION_PATCH}")
|
||||
endif(NOT EIGEN2_MIN_VERSION)
|
||||
|
||||
macro(_eigen2_check_version)
|
||||
file(READ "${EIGEN2_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen2_version_header LIMIT 5000 OFFSET 1000)
|
||||
|
||||
string(REGEX MATCH "define *EIGEN_WORLD_VERSION ([0-9]*)" _eigen2_world_version_match "${_eigen2_version_header}")
|
||||
set(EIGEN2_WORLD_VERSION "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH "define *EIGEN_MAJOR_VERSION ([0-9]*)" _eigen2_major_version_match "${_eigen2_version_header}")
|
||||
set(EIGEN2_MAJOR_VERSION "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH "define *EIGEN_MINOR_VERSION ([0-9]*)" _eigen2_minor_version_match "${_eigen2_version_header}")
|
||||
set(EIGEN2_MINOR_VERSION "${CMAKE_MATCH_1}")
|
||||
|
||||
set(EIGEN2_VERSION ${EIGEN2_WORLD_VERSION}.${EIGEN2_MAJOR_VERSION}.${EIGEN2_MINOR_VERSION})
|
||||
if(${EIGEN2_VERSION} VERSION_LESS ${EIGEN2_MIN_VERSION})
|
||||
set(EIGEN2_VERSION_OK FALSE)
|
||||
else(${EIGEN2_VERSION} VERSION_LESS ${EIGEN2_MIN_VERSION})
|
||||
set(EIGEN2_VERSION_OK TRUE)
|
||||
endif(${EIGEN2_VERSION} VERSION_LESS ${EIGEN2_MIN_VERSION})
|
||||
|
||||
if(NOT EIGEN2_VERSION_OK)
|
||||
|
||||
message(STATUS "Eigen2 version ${EIGEN2_VERSION} found in ${EIGEN2_INCLUDE_DIR}, "
|
||||
"but at least version ${EIGEN2_MIN_VERSION} is required")
|
||||
endif(NOT EIGEN2_VERSION_OK)
|
||||
endmacro(_eigen2_check_version)
|
||||
|
||||
if (EIGEN2_INCLUDE_DIR)
|
||||
|
||||
# in cache already
|
||||
_eigen2_check_version()
|
||||
set(EIGEN2_FOUND ${EIGEN2_VERSION_OK})
|
||||
|
||||
else (EIGEN2_INCLUDE_DIR)
|
||||
|
||||
find_path(EIGEN2_INCLUDE_DIR NAMES Eigen/Core
|
||||
PATHS
|
||||
${INCLUDE_INSTALL_DIR}
|
||||
${KDE4_INCLUDE_DIR}
|
||||
PATH_SUFFIXES eigen2
|
||||
)
|
||||
|
||||
if(EIGEN2_INCLUDE_DIR)
|
||||
_eigen2_check_version()
|
||||
endif(EIGEN2_INCLUDE_DIR)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Eigen2 DEFAULT_MSG EIGEN2_INCLUDE_DIR EIGEN2_VERSION_OK)
|
||||
|
||||
mark_as_advanced(EIGEN2_INCLUDE_DIR)
|
||||
|
||||
endif(EIGEN2_INCLUDE_DIR)
|
||||
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
|
||||
if(NOT Eigen3_FIND_VERSION)
|
||||
if(NOT Eigen3_FIND_VERSION_MAJOR)
|
||||
set(Eigen3_FIND_VERSION_MAJOR 3)
|
||||
set(Eigen3_FIND_VERSION_MAJOR 2)
|
||||
endif(NOT Eigen3_FIND_VERSION_MAJOR)
|
||||
if(NOT Eigen3_FIND_VERSION_MINOR)
|
||||
set(Eigen3_FIND_VERSION_MINOR 0)
|
||||
set(Eigen3_FIND_VERSION_MINOR 91)
|
||||
endif(NOT Eigen3_FIND_VERSION_MINOR)
|
||||
if(NOT Eigen3_FIND_VERSION_PATCH)
|
||||
set(Eigen3_FIND_VERSION_PATCH 0)
|
||||
@@ -73,7 +73,7 @@ else (EIGEN3_INCLUDE_DIR)
|
||||
endif(EIGEN3_INCLUDE_DIR)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Eigen3 REQUIRED_VARS EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK VERSION_VAR EIGEN3_VERSION)
|
||||
find_package_handle_standard_args(Eigen3 DEFAULT_MSG EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK)
|
||||
|
||||
mark_as_advanced(EIGEN3_INCLUDE_DIR)
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
# This module finds the f2c library.
|
||||
#
|
||||
# This module sets the following variables:
|
||||
# F2C_FOUND - set to true if library is found
|
||||
# F2C_DEFINITIONS - compilation options to use f2c
|
||||
# F2C_LIBRARIES - f2c library name (using full path name)
|
||||
|
||||
if (F2C_LIBRARIES)
|
||||
|
||||
set(F2C_FOUND TRUE)
|
||||
|
||||
else(F2C_LIBRARIES)
|
||||
|
||||
set(F2C_DEFINITIONS)
|
||||
|
||||
find_library(F2C_LIBRARIES f2c
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
)
|
||||
|
||||
if(F2C_LIBRARIES)
|
||||
set(F2C_FOUND TRUE)
|
||||
else()
|
||||
set(F2C_FOUND FALSE)
|
||||
endif()
|
||||
|
||||
if(NOT F2C_FIND_QUIETLY)
|
||||
if(F2C_FOUND)
|
||||
message(STATUS "f2c library found.")
|
||||
else(F2C_FOUND)
|
||||
if(F2C_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "f2c library not found. Please specify library location.")
|
||||
else()
|
||||
message(STATUS "f2c library not found. Please specify library location.")
|
||||
endif()
|
||||
endif(F2C_FOUND)
|
||||
endif(NOT F2C_FIND_QUIETLY)
|
||||
|
||||
endif(F2C_LIBRARIES)
|
||||
@@ -1,70 +0,0 @@
|
||||
# - Find MED file installation
|
||||
#
|
||||
# The following variable are set:
|
||||
# MEDFILE_INCLUDE_DIRS
|
||||
# MEDFILE_LIBRARIES
|
||||
# MEDFILE_C_LIBRARIES
|
||||
# MEDFILE_F_LIBRARIES
|
||||
# MEDFILE_VERSION
|
||||
#
|
||||
# The CMake (or environment) variable MEDFILE_ROOT_DIR can be set to
|
||||
# guide the detection and indicate a root directory to look into.
|
||||
#
|
||||
############################################################################
|
||||
# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library 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
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
|
||||
# ------
|
||||
|
||||
MESSAGE(STATUS "Check for medfile (libmed and libmedc) ...")
|
||||
|
||||
# ------
|
||||
|
||||
SET(MEDFILE_ROOT_DIR $ENV{MEDFILE_ROOT_DIR} CACHE PATH "Path to the MEDFile.")
|
||||
IF(MEDFILE_ROOT_DIR)
|
||||
LIST(APPEND CMAKE_PREFIX_PATH "${MEDFILE_ROOT_DIR}")
|
||||
ENDIF(MEDFILE_ROOT_DIR)
|
||||
|
||||
FIND_PATH(MEDFILE_INCLUDE_DIRS med.h PATH_SUFFIXES med)
|
||||
FIND_FILE(meddotH med.h PATHS ${MEDFILE_INCLUDE_DIRS} NO_DEFAULT_PATH)
|
||||
IF(NOT meddotH)
|
||||
MESSAGE(FATAL_ERROR "med.h not found, please install development header-files for libmedc")
|
||||
ENDIF(NOT meddotH)
|
||||
#FIND_PROGRAM(MDUMP mdump)
|
||||
FIND_LIBRARY(MEDFILE_C_LIBRARIES NAMES medC)
|
||||
FIND_LIBRARY(MEDFILE_F_LIBRARIES NAMES med)
|
||||
IF(MEDFILE_F_LIBRARIES)
|
||||
SET(MEDFILE_LIBRARIES ${MEDFILE_C_LIBRARIES} ${MEDFILE_F_LIBRARIES})
|
||||
ELSE(MEDFILE_F_LIBRARIES)
|
||||
SET(MEDFILE_LIBRARIES ${MEDFILE_C_LIBRARIES})
|
||||
ENDIF(MEDFILE_F_LIBRARIES)
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MEDFile REQUIRED_VARS MEDFILE_INCLUDE_DIRS MEDFILE_LIBRARIES)
|
||||
|
||||
IF(meddotH)
|
||||
FILE(READ "${meddotH}" _med_h)
|
||||
STRING(REGEX MATCH "define[ \t]+MED_MAJOR_NUM[ \t]+([0-9?])" _med_major_version_match "${_med_h}")
|
||||
SET(MED_MAJOR_VERSION "${CMAKE_MATCH_1}")
|
||||
STRING(REGEX MATCH "define[ \t]+MED_MINOR_NUM[ \t]+([0-9?])" _med_minor_version_match "${_med_h}")
|
||||
SET(MED_MINOR_VERSION "${CMAKE_MATCH_1}")
|
||||
STRING(REGEX MATCH "define[ \t]+MED_RELEASE_NUM[ \t]+([0-9?])" _med_release_version_match "${_med_h}")
|
||||
SET(MED_RELEASE_VERSION "${CMAKE_MATCH_1}")
|
||||
SET(MEDFILE_VERSION "${MED_MAJOR_VERSION}.${MED_MINOR_VERSION}.${MED_RELEASE_VERSION}")
|
||||
ENDIF()
|
||||
@@ -9,7 +9,7 @@
|
||||
# MATPLOTLIB_VERSION_PATCH - the patch version number of matplotlib
|
||||
# MATPLOTLIB_PATH_DIRS - path to the matplotlib include files
|
||||
|
||||
IF(Python3_Interpreter_FOUND)
|
||||
IF(PYTHONINTERP_FOUND)
|
||||
# Try to import matplotlib into Python interpreter. Python
|
||||
# interpreter was found previously as required package, so
|
||||
# don't take care about this.
|
||||
|
||||
@@ -1,175 +0,0 @@
|
||||
# Try to find nglib/netgen
|
||||
#
|
||||
# Optional input NETGENDATA is path to the netgen libsrc source tree - this is
|
||||
# required due to some headers not being installed by netgen.
|
||||
#
|
||||
# Once done this will define
|
||||
#
|
||||
# NGLIB_INCLUDE_DIR - where the nglib include directory can be found
|
||||
# NGLIB_LIBRARIES - Link this to use nglib
|
||||
# NETGEN_INCLUDE_DIRS - where the netgen include directories can be found
|
||||
# NETGEN_DEFINITIONS - C++ compiler defines required to use netgen/nglib
|
||||
#
|
||||
# See also: http://git.salome-platform.org/gitweb/?p=NETGENPLUGIN_SRC.git;a=summary
|
||||
|
||||
|
||||
find_package(Netgen CONFIG)
|
||||
if(Netgen_FOUND)
|
||||
set(NGLIB_INCLUDE_DIR ${NETGEN_INCLUDE_DIRS})
|
||||
set(NGLIB_LIBRARIES nglib)
|
||||
set(NETGEN_DEFINITIONS -DNO_PARALLEL_THREADS -DOCCGEOMETRY)
|
||||
# for external smesh only the following two variables are needed:
|
||||
set(NETGEN_FOUND True)
|
||||
set(NETGEN_INCLUDE_DIRS ${NETGEN_INCLUDE_DIRS})
|
||||
|
||||
else(Netgen_FOUND)
|
||||
|
||||
|
||||
SET(NETGEN_DEFINITIONS -DNO_PARALLEL_THREADS -DOCCGEOMETRY)
|
||||
|
||||
IF(DEFINED MACPORTS_PREFIX OR DEFINED HOMEBREW_PREFIX)
|
||||
# We haven't supported Netgen prior to 5.3.1 on MacOS, and the current
|
||||
# plan is for the next Netgen version to be 6.1 (currently unreleased).
|
||||
IF(DEFINED HOMEBREW_PREFIX)
|
||||
SET(NGLIB_PREFIX ${HOMEBREW_PREFIX})
|
||||
ELSE(DEFINED HOMEBREW_PREFIX)
|
||||
SET(NGLIB_PREFIX ${MACPORTS_PREFIX})
|
||||
ENDIF(DEFINED HOMEBREW_PREFIX)
|
||||
|
||||
FIND_PATH(NGLIB_INCLUDE_DIR nglib.h ${NGLIB_PREFIX}/include)
|
||||
|
||||
FIND_LIBRARY(NGLIB_LIBNGLIB nglib ${NGLIB_PREFIX}/lib)
|
||||
FIND_LIBRARY(NGLIB_LIBMESH mesh ${NGLIB_PREFIX}/lib)
|
||||
FIND_LIBRARY(NGLIB_LIBOCC occ ${NGLIB_PREFIX}/lib)
|
||||
FIND_LIBRARY(NGLIB_LIBINTERFACE interface ${NGLIB_PREFIX}/lib)
|
||||
SET(NGLIB_LIBRARIES ${NGLIB_LIBNGLIB} ${NGLIB_LIBMESH}
|
||||
${NGLIB_LIBOCC} ${NGLIB_LIBINTERFACE})
|
||||
|
||||
IF(NOT NETGENDATA)
|
||||
SET(NETGENDATA ${NGLIB_PREFIX}/include/netgen)
|
||||
ENDIF(NOT NETGENDATA)
|
||||
|
||||
ELSEIF(WIN32)
|
||||
FIND_PATH(NGLIB_INCLUDE_DIR NAMES nglib.h PATHS ${NETGEN_INCLUDEDIR})
|
||||
SET(NETGEN_LIBS nglib mesh occ interface)
|
||||
SET(NGLIB_LIBRARIES "")
|
||||
FOREACH(it ${NETGEN_LIBS})
|
||||
FIND_LIBRARY(NGLIB ${it} PATHS ${NETGEN_LIBDIR})
|
||||
FIND_LIBRARY(NGLIBD ${it}d PATHS ${NETGEN_LIBDIR})
|
||||
IF(NGLIBD AND NGLIB)
|
||||
SET(NG_LIB optimized ${NGLIB}
|
||||
debug ${NGLIBD})
|
||||
SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NG_LIB})
|
||||
UNSET(NGLIB CACHE)
|
||||
UNSET(NGLIBD CACHE)
|
||||
ELSEIF(NGLIB)
|
||||
SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NGLIB})
|
||||
UNSET(NGLIB CACHE)
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
|
||||
IF(NOT NETGENDATA)
|
||||
SET(NETGENDATA netgen)
|
||||
ENDIF(NOT NETGENDATA)
|
||||
|
||||
ELSE(DEFINED MACPORTS_PREFIX OR DEFINED HOMEBREW_PREFIX)
|
||||
IF(NETGEN_ROOT)
|
||||
SET(NETGEN_INCLUDEDIR ${NETGEN_ROOT}/include)
|
||||
SET(NETGEN_LIBDIR ${NETGEN_ROOT}/lib)
|
||||
# allow to customize if NETGEN_ROOT is used
|
||||
IF(NOT NETGENDATA)
|
||||
SET(NETGENDATA ${NETGEN_ROOT}/libsrc)
|
||||
ENDIF(NOT NETGENDATA)
|
||||
ENDIF()
|
||||
|
||||
FIND_PATH(NGLIB_INCLUDE_DIR NAMES nglib.h PATHS ${NETGEN_INCLUDEDIR} /usr/include /usr/include/netgen-mesher)
|
||||
FIND_LIBRARY(NGLIB_LIBNGLIB nglib PATHS ${NETGEN_LIBDIR} /usr/lib /usr/lib64 /usr/local/lib)
|
||||
SET(NGLIB_LIBRARIES ${NGLIB_LIBNGLIB})
|
||||
FIND_LIBRARY(NGLIB_LIBMESH NAMES mesh ngmesh PATHS ${NETGEN_LIBDIR} /usr/lib /usr/lib64 /usr/local/lib)
|
||||
IF(NGLIB_LIBMESH)
|
||||
SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NGLIB_LIBMESH})
|
||||
ENDIF()
|
||||
FIND_LIBRARY(NGLIB_LIBOCC NAMES occ ngocc PATHS ${NETGEN_LIBDIR} /usr/lib /usr/lib64 /usr/local/lib)
|
||||
IF(NGLIB_LIBOCC)
|
||||
SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NGLIB_LIBOCC})
|
||||
ENDIF()
|
||||
FIND_LIBRARY(NGLIB_LIBINTERFACE NAMES interface nginterface PATHS ${NETGEN_LIBDIR} /usr/lib /usr/lib64 /usr/local/lib)
|
||||
IF(NGLIB_LIBINTERFACE)
|
||||
SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NGLIB_LIBINTERFACE})
|
||||
ENDIF()
|
||||
|
||||
IF(NOT NETGENDATA)
|
||||
SET(NETGENDATA /usr/share/netgen/libsrc)
|
||||
ENDIF(NOT NETGENDATA)
|
||||
|
||||
ENDIF(DEFINED MACPORTS_PREFIX OR DEFINED HOMEBREW_PREFIX)
|
||||
|
||||
FIND_PATH(NETGEN_DIR_include NAMES mydefs.hpp NO_DEFAULT_PATH PATHS ${NGLIB_INCLUDE_DIR}/include ${NETGENDATA}/include ${NETGEN_INCLUDEDIR} ${NGLIB_INCLUDE_DIR})
|
||||
|
||||
IF(NOT NGLIB_INCLUDE_DIR AND NOT NETGEN_DIR_include)
|
||||
MESSAGE(STATUS "Cannot find NETGEN header files.")
|
||||
ELSEIF(NOT NETGEN_VERSION)
|
||||
file(STRINGS ${NETGEN_DIR_include}/mydefs.hpp NETGEN_VERSION
|
||||
REGEX "#define PACKAGE_VERSION.*"
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
IF(NOT NGLIB_LIBRARIES)
|
||||
MESSAGE(STATUS "Cannot find NETGEN library.")
|
||||
ENDIF()
|
||||
|
||||
IF(NGLIB_INCLUDE_DIR AND NGLIB_LIBRARIES)
|
||||
SET(Netgen_FOUND TRUE)
|
||||
SET(NETGEN_INCLUDE_DIRS ${NETGEN_DIR_include} ${NGLIB_INCLUDE_DIR})
|
||||
LIST(REMOVE_DUPLICATES NETGEN_INCLUDE_DIRS)
|
||||
ELSE()
|
||||
SET(Netgen_FOUND FALSE)
|
||||
ENDIF()
|
||||
endif(Netgen_FOUND)
|
||||
|
||||
# Package-provided cMake file is not enough
|
||||
IF(Netgen_FOUND)
|
||||
IF(NOT NETGEN_VERSION_MAJOR)
|
||||
IF(NETGEN_VERSION)
|
||||
string(REGEX MATCHALL "[0-9]+" NETGEN_VERSION_expr ${NETGEN_VERSION})
|
||||
list(LENGTH NETGEN_VERSION_expr NETGEN_VERSION_COUNT)
|
||||
list(GET NETGEN_VERSION_expr 0 NETGEN_VERSION_MAJOR)
|
||||
IF(NETGEN_VERSION_COUNT GREATER 1)
|
||||
list(GET NETGEN_VERSION_expr 1 NETGEN_VERSION_MINOR)
|
||||
ELSE()
|
||||
set(NETGEN_VERSION_MINOR 0)
|
||||
ENDIF()
|
||||
ELSE() # workaround for netgen 6.2 and newer. currently there is no easy way to detect the version
|
||||
# better use "find_package(netgen CONFIG REQUIRED)"
|
||||
set(NETGEN_VERSION_MAJOR 6)
|
||||
set(NETGEN_VERSION_MINOR 2)
|
||||
ENDIF()
|
||||
set(NETGEN_VERSION_PATCH 0)
|
||||
ENDIF()
|
||||
|
||||
MATH(EXPR NETGEN_VERSION_C "(${NETGEN_VERSION_MAJOR} << 16) + (${NETGEN_VERSION_MINOR} << 8) + (${NETGEN_VERSION_PATCH})")
|
||||
MATH(EXPR NETGEN_VERSION_62 "(6 << 16) + (2 << 8)")
|
||||
MATH(EXPR NETGEN_VERSION_62_2004 "(6 << 16) + (2 << 8) + (2004)")
|
||||
IF(NOT NETGEN_VERSION_C LESS NETGEN_VERSION_62) # Version >= 6.2
|
||||
IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
# Clang sometimes fails to include <cstdio>
|
||||
include(CMakePushCheckState)
|
||||
cmake_push_check_state(RESET)
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${NETGEN_CXX_FLAGS}")
|
||||
check_cxx_source_compiles("#include <cstdio>\nint main(){}" CSTDIO_INCLUDE_TRY1)
|
||||
IF(NOT CSTDIO_INCLUDE_TRY1)
|
||||
# Ugly hack to make <stdio.h> building gets function
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -U__cplusplus -D__cplusplus=201103L")
|
||||
check_cxx_source_compiles("#include <cstdio>\nint main(){}" CSTDIO_INCLUDE_TRY2)
|
||||
IF(NOT CSTDIO_INCLUDE_TRY2)
|
||||
message(FATAL_ERROR "Cannot #include <cstdio>.")
|
||||
ELSE()
|
||||
set(NETGEN_CXX_FLAGS "${NETGEN_CXX_FLAGS} -U__cplusplus -D__cplusplus=201103L")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
cmake_pop_check_state()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
MESSAGE(STATUS "Found NETGEN version ${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}, calculated: ${NETGEN_VERSION_C}")
|
||||
LIST(APPEND NETGEN_DEFINITIONS -DNETGEN_VERSION=${NETGEN_VERSION_C})
|
||||
ENDIF()
|
||||
@@ -1,173 +0,0 @@
|
||||
# Try to find OCE / OCC
|
||||
# Once done this will define
|
||||
#
|
||||
# OCC_FOUND - system has OCC - OpenCASCADE
|
||||
# OCC_INCLUDE_DIR - where the OCC include directory can be found
|
||||
# OCC_LIBRARY_DIR - where the OCC library directory can be found
|
||||
# OCC_LIBRARIES - Link this to use OCC
|
||||
# OCC_OCAF_LIBRARIES - Link this to use OCC OCAF framework
|
||||
|
||||
# First try to find OpenCASCADE Community Edition
|
||||
if(NOT DEFINED OCE_DIR)
|
||||
# Check for OSX needs to come first because UNIX evaluates to true on OSX
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
if(DEFINED MACPORTS_PREFIX)
|
||||
find_package(OCE QUIET HINTS ${MACPORTS_PREFIX}/Library/Frameworks)
|
||||
elseif(DEFINED HOMEBREW_PREFIX)
|
||||
find_package(OCE QUIET HINTS ${HOMEBREW_PREFIX}/Cellar/oce/*)
|
||||
endif()
|
||||
elseif(UNIX)
|
||||
set(OCE_DIR "/usr/local/share/cmake/")
|
||||
elseif(WIN32)
|
||||
set(OCE_DIR "c:/OCE-0.4.0/share/cmake")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(${FREECAD_USE_OCC_VARIANT} MATCHES "Community Edition")
|
||||
find_package(OCE QUIET)
|
||||
endif()
|
||||
|
||||
if(OCE_FOUND)
|
||||
message(STATUS "-- OpenCASCADE Community Edition has been found.")
|
||||
# Disable this define. For more details see bug #0001872
|
||||
#add_definitions (-DHAVE_CONFIG_H)
|
||||
set(OCC_INCLUDE_DIR ${OCE_INCLUDE_DIRS})
|
||||
#set(OCC_LIBRARY_DIR ${OCE_LIBRARY_DIR})
|
||||
else(OCE_FOUND) #look for OpenCASCADE
|
||||
# we first try to find opencascade directly:
|
||||
if(NOT OCCT_CMAKE_FALLBACK)
|
||||
find_package(OpenCASCADE CONFIG QUIET)
|
||||
if(NOT (CMAKE_VERSION VERSION_LESS 3.6.0))
|
||||
get_property(flags DIRECTORY PROPERTY COMPILE_DEFINITIONS)
|
||||
# OCCT 7.5 adds this define that causes hundreds of compiler warnings with Qt5.x, so remove it again
|
||||
list(FILTER flags EXCLUDE REGEX [[GL_GLEXT_LEGACY]])
|
||||
set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS ${flags})
|
||||
endif()
|
||||
endif(NOT OCCT_CMAKE_FALLBACK)
|
||||
if(OpenCASCADE_FOUND)
|
||||
set(OCC_FOUND ${OpenCASCADE_FOUND})
|
||||
set(OCC_INCLUDE_DIR ${OpenCASCADE_INCLUDE_DIR})
|
||||
set(OCC_LIBRARY_DIR ${OpenCASCADE_LIBRARY_DIR})
|
||||
set(OCC_LIBRARIES ${OpenCASCADE_LIBRARIES})
|
||||
set(OCC_OCAF_LIBRARIES TKCAF TKXCAF)
|
||||
else(OpenCASCADE_FOUND)
|
||||
if(WIN32)
|
||||
if(CYGWIN OR MINGW)
|
||||
FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
|
||||
/usr/include/opencascade
|
||||
/usr/local/include/opencascade
|
||||
/opt/opencascade/include
|
||||
/opt/opencascade/inc
|
||||
)
|
||||
FIND_LIBRARY(OCC_LIBRARY TKernel
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/opencascade/lib
|
||||
)
|
||||
else(CYGWIN OR MINGW)
|
||||
FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\OCC\\2;Installation Path]/include"
|
||||
)
|
||||
FIND_LIBRARY(OCC_LIBRARY TKernel
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\OCC\\2;Installation Path]/lib"
|
||||
)
|
||||
endif(CYGWIN OR MINGW)
|
||||
else(WIN32)
|
||||
FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
|
||||
/usr/include/occt
|
||||
/usr/include/opencascade
|
||||
/usr/local/include/opencascade
|
||||
/opt/opencascade/include
|
||||
/opt/opencascade/inc
|
||||
)
|
||||
FIND_LIBRARY(OCC_LIBRARY TKernel
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/opencascade/lib
|
||||
)
|
||||
endif(WIN32)
|
||||
if(OCC_LIBRARY)
|
||||
GET_FILENAME_COMPONENT(OCC_LIBRARY_DIR ${OCC_LIBRARY} PATH)
|
||||
IF(NOT OCC_INCLUDE_DIR)
|
||||
FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
|
||||
${OCC_LIBRARY_DIR}/../inc
|
||||
)
|
||||
ENDIF()
|
||||
endif(OCC_LIBRARY)
|
||||
endif(OpenCASCADE_FOUND)
|
||||
endif(OCE_FOUND)
|
||||
|
||||
if(OCC_INCLUDE_DIR)
|
||||
file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MAJOR
|
||||
REGEX "#define OCC_VERSION_MAJOR.*"
|
||||
)
|
||||
string(REGEX MATCH "[0-9]+" OCC_MAJOR ${OCC_MAJOR})
|
||||
file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MINOR
|
||||
REGEX "#define OCC_VERSION_MINOR.*"
|
||||
)
|
||||
string(REGEX MATCH "[0-9]+" OCC_MINOR ${OCC_MINOR})
|
||||
file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MAINT
|
||||
REGEX "#define OCC_VERSION_MAINTENANCE.*"
|
||||
)
|
||||
string(REGEX MATCH "[0-9]+" OCC_MAINT ${OCC_MAINT})
|
||||
|
||||
set(OCC_VERSION_STRING "${OCC_MAJOR}.${OCC_MINOR}.${OCC_MAINT}")
|
||||
endif(OCC_INCLUDE_DIR)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set OCC_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OCC REQUIRED_VARS OCC_INCLUDE_DIR VERSION_VAR OCC_VERSION_STRING)
|
||||
|
||||
if(OCC_FOUND)
|
||||
set(OCC_LIBRARIES
|
||||
TKFillet
|
||||
TKMesh
|
||||
TKernel
|
||||
TKG2d
|
||||
TKG3d
|
||||
TKMath
|
||||
TKIGES
|
||||
TKSTL
|
||||
TKShHealing
|
||||
TKXSBase
|
||||
TKBool
|
||||
TKBO
|
||||
TKBRep
|
||||
TKTopAlgo
|
||||
TKGeomAlgo
|
||||
TKGeomBase
|
||||
TKOffset
|
||||
TKPrim
|
||||
TKSTEPBase
|
||||
TKSTEPAttr
|
||||
TKSTEP209
|
||||
TKSTEP
|
||||
TKHLR
|
||||
TKFeat
|
||||
)
|
||||
set(OCC_OCAF_LIBRARIES
|
||||
TKBin
|
||||
TKBinL
|
||||
TKCAF
|
||||
TKXCAF
|
||||
TKLCAF
|
||||
TKVCAF
|
||||
TKCDF
|
||||
TKXDESTEP
|
||||
TKXDEIGES
|
||||
TKMeshVS
|
||||
TKService
|
||||
TKV3d
|
||||
)
|
||||
if(OCC_VERSION_STRING VERSION_LESS 6.7.3)
|
||||
list(APPEND OCC_OCAF_LIBRARIES TKAdvTools)
|
||||
elseif(NOT OCC_VERSION_STRING VERSION_LESS 7.5.0)
|
||||
list(APPEND OCC_OCAF_LIBRARIES TKRWMesh)
|
||||
endif(OCC_VERSION_STRING VERSION_LESS 6.7.3)
|
||||
message(STATUS "-- Found OCE/OpenCASCADE version: ${OCC_VERSION_STRING}")
|
||||
message(STATUS "-- OCE/OpenCASCADE include directory: ${OCC_INCLUDE_DIR}")
|
||||
message(STATUS "-- OCE/OpenCASCADE shared libraries directory: ${OCC_LIBRARY_DIR}")
|
||||
else(OCC_FOUND)
|
||||
#message(SEND_ERROR "Neither OpenCASCADE Community Edition nor OpenCasCade were found: will not build CAD modules!")
|
||||
endif(OCC_FOUND)
|
||||
@@ -0,0 +1,80 @@
|
||||
# - Try to find the Open Dynamics Engine library
|
||||
# Once done this will define:
|
||||
#
|
||||
# ODE_FOUND - system has the ODE library
|
||||
# ODE_INCLUDE_DIRS - the ODE include directory (include ODE headers with <ode/headername.h>)
|
||||
# ODE_LIBRARIES - the ODE library
|
||||
# ODE_DEFINITIONS - additional definitions necessary to use ODE (usually the precision flag)
|
||||
|
||||
if (ODE_INCLUDE_DIRS AND ODE_LIBRARIES)
|
||||
# ODE has already been found and the necessary variables are cached
|
||||
set(ODE_FOUND TRUE)
|
||||
else (ODE_INCLUDE_DIRS AND ODE_LIBRARIES)
|
||||
# Find ODE
|
||||
|
||||
# Use PkgConfig if possible
|
||||
if (NOT WIN32)
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(PC_ODE ode)
|
||||
endif (NOT WIN32)
|
||||
|
||||
# Find include dir
|
||||
find_path(ODE_INCLUDE_DIRS ode/ode.h
|
||||
HINTS ${PC_ODE_INCLUDEDIR}
|
||||
PATHS $ENV{OGRE_HOME}/include # ODE is shipped with the OGRE SDK
|
||||
)
|
||||
find_library(ODE_LIBRARIES ode
|
||||
NAMES ode ${PC_ODE_LIBRARIES}
|
||||
HINTS ${PC_ODE_LIBDIR}
|
||||
PATHS $ENV{OGRE_HOME}/lib
|
||||
)
|
||||
|
||||
# Decide if ODE was found
|
||||
set(ODE_FOUND FALSE)
|
||||
if (ODE_INCLUDE_DIRS AND ODE_LIBRARIES)
|
||||
set(ODE_FOUND TRUE)
|
||||
endif (ODE_INCLUDE_DIRS AND ODE_LIBRARIES)
|
||||
|
||||
# Find out extra definitions needed for ODE.
|
||||
# This is mostly needed for the ODE's precision selector:
|
||||
# ODE can be built either in single-precision (default) or double-precision mode. The app has
|
||||
# to be built in the same mode, otherwise things will crash.
|
||||
if (ODE_FOUND)
|
||||
# If PkgConfig found anything, then use its results, otherwise use ode-config script
|
||||
if (PC_ODE_FOUND)
|
||||
# Take the definitions from PkgConfig results
|
||||
set(ODE_DEFINITIONS ${PC_ODE_CFLAGS_OTHER} CACHE STRING "")
|
||||
set(ODE_DEFINITIONS_FOUND TRUE)
|
||||
else (PC_ODE_FOUND)
|
||||
# Try to use ode-config
|
||||
find_program(ODECONFIG_EXECUTABLE ode-config)
|
||||
if (ODECONFIG_EXECUTABLE)
|
||||
execute_process(COMMAND ${ODECONFIG_EXECUTABLE} --cflags OUTPUT_VARIABLE ODECONFIG_CFLAGS)
|
||||
set(ODE_DEFINITIONS ${ODECONFIG_CFLAGS} CACHE STRING "")
|
||||
set(ODE_DEFINITIONS_FOUND TRUE)
|
||||
endif (ODECONFIG_EXECUTABLE)
|
||||
endif (PC_ODE_FOUND)
|
||||
endif (ODE_FOUND)
|
||||
|
||||
# Show messages
|
||||
if (ODE_FOUND)
|
||||
if (NOT ODE_FIND_QUIETLY)
|
||||
message(STATUS "Found ODE: ${ODE_LIBRARIES}")
|
||||
# Show the ODE precision if the definitions were detected
|
||||
if (ODE_DEFINITIONS_FOUND)
|
||||
if (ODE_DEFINITIONS MATCHES -DdDOUBLE)
|
||||
message(STATUS "ODE uses double precision")
|
||||
else (ODE_DEFINITIONS MATCHES -DdDOUBLE)
|
||||
message(STATUS "ODE uses single precision")
|
||||
endif (ODE_DEFINITIONS MATCHES -DdDOUBLE)
|
||||
else (ODE_DEFINITIONS_FOUND)
|
||||
message(STATUS "Warning: couldn't determine ODE's precision")
|
||||
endif (ODE_DEFINITIONS_FOUND)
|
||||
endif (NOT ODE_FIND_QUIETLY)
|
||||
else (ODE_FOUND)
|
||||
if (ODE_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could NOT find ODE")
|
||||
endif (ODE_FIND_REQUIRED)
|
||||
endif (ODE_FOUND)
|
||||
|
||||
endif(ODE_INCLUDE_DIRS AND ODE_LIBRARIES)
|
||||
+44
-44
@@ -1,12 +1,12 @@
|
||||
# - Try to find OpenCV library installation
|
||||
# See http://sourceforge.net/projects/opencvlibrary/
|
||||
#
|
||||
# The following variables are optionally searched for defaults
|
||||
# The follwoing variables are optionally searched for defaults
|
||||
# OpenCV_ROOT_DIR: Base directory of OpenCv tree to use.
|
||||
# OpenCV_FIND_REQUIRED_COMPONENTS : FIND_PACKAGE(OpenCV COMPONENTS ..)
|
||||
# OpenCV_FIND_REQUIRED_COMPONENTS : FIND_PACKAGE(OpenCV COMPONENTS ..)
|
||||
# compatible interface. typically CV CXCORE CVAUX HIGHGUI CVCAM .. etc.
|
||||
#
|
||||
# The following are set after configuration is done:
|
||||
# The following are set after configuration is done:
|
||||
# OpenCV_FOUND
|
||||
# OpenCV_INCLUDE_DIR
|
||||
# OpenCV_LIBRARIES
|
||||
@@ -16,10 +16,10 @@
|
||||
# OPENCV_* uppercase replaced by case sensitive OpenCV_*
|
||||
# OPENCV_EXE_LINKER_FLAGS
|
||||
# OPENCV_INCLUDE_DIR : replaced by plural *_DIRS
|
||||
#
|
||||
# 2004/05 Jan Woetzel, Friso, Daniel Grest
|
||||
#
|
||||
# 2004/05 Jan Woetzel, Friso, Daniel Grest
|
||||
# 2006/01 complete rewrite by Jan Woetzel
|
||||
# 1006/09 2nd rewrite introducing ROOT_DIR and PATH_SUFFIXES
|
||||
# 1006/09 2nd rewrite introducing ROOT_DIR and PATH_SUFFIXES
|
||||
# to handle multiple installed versions gracefully by Jan Woetzel
|
||||
#
|
||||
# tested with:
|
||||
@@ -42,14 +42,14 @@ IF (NOT OpenCV_FIND_COMPONENTS)
|
||||
SET(OpenCV_FIND_REQUIRED_COMPONENTS CV CXCORE CVAUX HIGHGUI )
|
||||
IF (WIN32)
|
||||
LIST(APPEND OpenCV_FIND_REQUIRED_COMPONENTS CVCAM ) # WIN32 only actually
|
||||
ENDIF(WIN32)
|
||||
ENDIF(WIN32)
|
||||
ENDIF (NOT OpenCV_FIND_COMPONENTS)
|
||||
|
||||
|
||||
# typical root dirs of installations, exactly one of them is used
|
||||
SET (OpenCV_POSSIBLE_ROOT_DIRS
|
||||
"${OpenCV_ROOT_DIR}"
|
||||
"$ENV{OpenCV_ROOT_DIR}"
|
||||
"$ENV{OpenCV_ROOT_DIR}"
|
||||
"$ENV{OPENCV_DIR}" # only for backward compatibility deprecated by ROOT_DIR
|
||||
"$ENV{OPENCV_HOME}" # only for backward compatibility
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Intel(R) Open Source Computer Vision Library_is1;Inno Setup: App Path]"
|
||||
@@ -59,17 +59,17 @@ SET (OpenCV_POSSIBLE_ROOT_DIRS
|
||||
)
|
||||
|
||||
|
||||
# MIP Uni Kiel /opt/net network installation
|
||||
# MIP Uni Kiel /opt/net network installation
|
||||
# get correct prefix for current gcc compiler version for gcc 3.x 4.x
|
||||
IF (${CMAKE_COMPILER_IS_GNUCXX})
|
||||
IF (NOT OpenCV_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Checking GNUCXX version 3/4 to determine OpenCV /opt/net/ path")
|
||||
ENDIF (NOT OpenCV_FIND_QUIETLY)
|
||||
EXEC_PROGRAM(${CMAKE_CXX_COMPILER} ARGS --version OUTPUT_VARIABLE CXX_COMPILER_VERSION)
|
||||
EXEC_PROGRAM(${CMAKE_CXX_COMPILER} ARGS --version OUTPUT_VARIABLE CXX_COMPILER_VERSION)
|
||||
IF (CXX_COMPILER_VERSION MATCHES ".*3\\.[0-9].*")
|
||||
SET(IS_GNUCXX3 TRUE)
|
||||
LIST(APPEND OpenCV_POSSIBLE_ROOT_DIRS /opt/net/gcc33/OpenCV )
|
||||
ENDIF(CXX_COMPILER_VERSION MATCHES ".*3\\.[0-9].*")
|
||||
ENDIF(CXX_COMPILER_VERSION MATCHES ".*3\\.[0-9].*")
|
||||
IF (CXX_COMPILER_VERSION MATCHES ".*4\\.[0-9].*")
|
||||
SET(IS_GNUCXX4 TRUE)
|
||||
LIST(APPEND OpenCV_POSSIBLE_ROOT_DIRS /opt/net/gcc41/OpenCV )
|
||||
@@ -79,15 +79,15 @@ ENDIF (${CMAKE_COMPILER_IS_GNUCXX})
|
||||
#DBG_MSG("DBG (OpenCV_POSSIBLE_ROOT_DIRS=${OpenCV_POSSIBLE_ROOT_DIRS}")
|
||||
|
||||
#
|
||||
# select exactly ONE OpenCV base directory/tree
|
||||
# select exactly ONE OpenCV base directory/tree
|
||||
# to avoid mixing different version headers and libs
|
||||
#
|
||||
FIND_PATH(OpenCV_ROOT_DIR
|
||||
NAMES
|
||||
FIND_PATH(OpenCV_ROOT_DIR
|
||||
NAMES
|
||||
cv/include/cv.h # windows
|
||||
include/opencv/cv.h # linux /opt/net
|
||||
include/cv/cv.h
|
||||
include/cv.h
|
||||
include/cv/cv.h
|
||||
include/cv.h
|
||||
PATHS ${OpenCV_POSSIBLE_ROOT_DIRS})
|
||||
DBG_MSG("OpenCV_ROOT_DIR=${OpenCV_ROOT_DIR}")
|
||||
|
||||
@@ -106,7 +106,7 @@ SET(OpenCV_INCDIR_SUFFIXES
|
||||
otherlibs/_graphics/include
|
||||
)
|
||||
|
||||
# library linkdir suffixes appended to OpenCV_ROOT_DIR
|
||||
# library linkdir suffixes appended to OpenCV_ROOT_DIR
|
||||
SET(OpenCV_LIBDIR_SUFFIXES
|
||||
lib
|
||||
OpenCV/lib
|
||||
@@ -119,56 +119,56 @@ SET(OpenCV_LIBDIR_SUFFIXES
|
||||
# find incdir for each lib
|
||||
#
|
||||
FIND_PATH(OpenCV_CV_INCLUDE_DIR
|
||||
NAMES cv.h
|
||||
PATHS ${OpenCV_ROOT_DIR}
|
||||
NAMES cv.h
|
||||
PATHS ${OpenCV_ROOT_DIR}
|
||||
PATH_SUFFIXES ${OpenCV_INCDIR_SUFFIXES} )
|
||||
FIND_PATH(OpenCV_CXCORE_INCLUDE_DIR
|
||||
FIND_PATH(OpenCV_CXCORE_INCLUDE_DIR
|
||||
NAMES cxcore.h
|
||||
PATHS ${OpenCV_ROOT_DIR}
|
||||
PATHS ${OpenCV_ROOT_DIR}
|
||||
PATH_SUFFIXES ${OpenCV_INCDIR_SUFFIXES} )
|
||||
FIND_PATH(OpenCV_CVAUX_INCLUDE_DIR
|
||||
FIND_PATH(OpenCV_CVAUX_INCLUDE_DIR
|
||||
NAMES cvaux.h
|
||||
PATHS ${OpenCV_ROOT_DIR}
|
||||
PATHS ${OpenCV_ROOT_DIR}
|
||||
PATH_SUFFIXES ${OpenCV_INCDIR_SUFFIXES} )
|
||||
FIND_PATH(OpenCV_HIGHGUI_INCLUDE_DIR
|
||||
NAMES highgui.h
|
||||
PATHS ${OpenCV_ROOT_DIR}
|
||||
FIND_PATH(OpenCV_HIGHGUI_INCLUDE_DIR
|
||||
NAMES highgui.h
|
||||
PATHS ${OpenCV_ROOT_DIR}
|
||||
PATH_SUFFIXES ${OpenCV_INCDIR_SUFFIXES} )
|
||||
FIND_PATH(OpenCV_CVCAM_INCLUDE_DIR
|
||||
NAMES cvcam.h
|
||||
PATHS ${OpenCV_ROOT_DIR}
|
||||
FIND_PATH(OpenCV_CVCAM_INCLUDE_DIR
|
||||
NAMES cvcam.h
|
||||
PATHS ${OpenCV_ROOT_DIR}
|
||||
PATH_SUFFIXES ${OpenCV_INCDIR_SUFFIXES} )
|
||||
|
||||
#
|
||||
# find sbsolute path to all libraries
|
||||
# find sbsolute path to all libraries
|
||||
# some are optionally, some may not exist on Linux
|
||||
#
|
||||
FIND_LIBRARY(OpenCV_CV_LIBRARY
|
||||
FIND_LIBRARY(OpenCV_CV_LIBRARY
|
||||
NAMES cv opencv
|
||||
PATHS ${OpenCV_ROOT_DIR}
|
||||
PATHS ${OpenCV_ROOT_DIR}
|
||||
PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
|
||||
FIND_LIBRARY(OpenCV_CVAUX_LIBRARY
|
||||
NAMES cvaux
|
||||
PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
|
||||
FIND_LIBRARY(OpenCV_CVCAM_LIBRARY
|
||||
FIND_LIBRARY(OpenCV_CVCAM_LIBRARY
|
||||
NAMES cvcam
|
||||
PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
|
||||
PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
|
||||
FIND_LIBRARY(OpenCV_CVHAARTRAINING_LIBRARY
|
||||
NAMES cvhaartraining
|
||||
PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
|
||||
FIND_LIBRARY(OpenCV_CXCORE_LIBRARY
|
||||
PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
|
||||
FIND_LIBRARY(OpenCV_CXCORE_LIBRARY
|
||||
NAMES cxcore
|
||||
PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
|
||||
FIND_LIBRARY(OpenCV_CXTS_LIBRARY
|
||||
FIND_LIBRARY(OpenCV_CXTS_LIBRARY
|
||||
NAMES cxts
|
||||
PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
|
||||
FIND_LIBRARY(OpenCV_HIGHGUI_LIBRARY
|
||||
FIND_LIBRARY(OpenCV_HIGHGUI_LIBRARY
|
||||
NAMES highgui
|
||||
PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
|
||||
FIND_LIBRARY(OpenCV_ML_LIBRARY
|
||||
FIND_LIBRARY(OpenCV_ML_LIBRARY
|
||||
NAMES ml
|
||||
PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
|
||||
FIND_LIBRARY(OpenCV_TRS_LIBRARY
|
||||
FIND_LIBRARY(OpenCV_TRS_LIBRARY
|
||||
NAMES trs
|
||||
PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} )
|
||||
|
||||
@@ -181,7 +181,7 @@ SET(OpenCV_FOUND ON)
|
||||
DBG_MSG("OpenCV_FIND_REQUIRED_COMPONENTS=${OpenCV_FIND_REQUIRED_COMPONENTS}")
|
||||
FOREACH(NAME ${OpenCV_FIND_REQUIRED_COMPONENTS} )
|
||||
|
||||
# only good if header and library both found
|
||||
# only good if header and library both found
|
||||
IF (OpenCV_${NAME}_INCLUDE_DIR AND OpenCV_${NAME}_LIBRARY)
|
||||
LIST(APPEND OpenCV_INCLUDE_DIRS ${OpenCV_${NAME}_INCLUDE_DIR} )
|
||||
LIST(APPEND OpenCV_LIBRARIES ${OpenCV_${NAME}_LIBRARY} )
|
||||
@@ -192,13 +192,13 @@ FOREACH(NAME ${OpenCV_FIND_REQUIRED_COMPONENTS} )
|
||||
"\nOpenCV_${NAME}_LIBRARY=${OpenCV_${NAME}_LIBRARY} ")
|
||||
SET(OpenCV_FOUND OFF)
|
||||
ENDIF (OpenCV_${NAME}_INCLUDE_DIR AND OpenCV_${NAME}_LIBRARY)
|
||||
|
||||
|
||||
ENDFOREACH(NAME)
|
||||
|
||||
DBG_MSG("OpenCV_INCLUDE_DIRS=${OpenCV_INCLUDE_DIRS}")
|
||||
DBG_MSG("OpenCV_LIBRARIES=${OpenCV_LIBRARIES}")
|
||||
|
||||
# get the link directory for rpath to be used with LINK_DIRECTORIES:
|
||||
# get the link directory for rpath to be used with LINK_DIRECTORIES:
|
||||
IF (OpenCV_CV_LIBRARY)
|
||||
GET_FILENAME_COMPONENT(OpenCV_LINK_DIRECTORIES ${OpenCV_CV_LIBRARY} PATH)
|
||||
ENDIF (OpenCV_CV_LIBRARY)
|
||||
@@ -239,7 +239,7 @@ IF(NOT OpenCV_FOUND)
|
||||
MESSAGE(FATAL_ERROR
|
||||
"OpenCV required but some headers or libs not found. Please specify it's location with OpenCV_ROOT_DIR env. variable.")
|
||||
ELSE(OpenCV_FIND_REQUIRED)
|
||||
MESSAGE(STATUS
|
||||
MESSAGE(STATUS
|
||||
"ERROR: OpenCV was not found.")
|
||||
ENDIF(OpenCV_FIND_REQUIRED)
|
||||
ENDIF(NOT OpenCV_FIND_QUIETLY)
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
# Try to find OCC
|
||||
# Once done this will define
|
||||
#
|
||||
# OCC_FOUND - system has OCC - OpenCASCADE
|
||||
# OCC_INCLUDE_DIR - where the OCC include directory can be found
|
||||
# OCC_LIBRARY_DIR - where the OCC library directory can be found
|
||||
# OCC_LIBRARIES - Link this to use OCC
|
||||
# OCC_OCAF_LIBRARIES - Link this to use OCC OCAF framework
|
||||
|
||||
|
||||
IF (WIN32)
|
||||
IF (CYGWIN OR MINGW)
|
||||
|
||||
FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
|
||||
/usr/include/opencascade
|
||||
/usr/local/include/opencascade
|
||||
)
|
||||
|
||||
FIND_LIBRARY(OCC_LIBRARY TKernel
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/opencascade/lib
|
||||
)
|
||||
|
||||
ELSE (CYGWIN OR MINGW)
|
||||
|
||||
FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\OCC\\2;Installation Path]/include"
|
||||
)
|
||||
|
||||
FIND_LIBRARY(OCC_LIBRARY TKernel
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\OCC\\2;Installation Path]/lib"
|
||||
)
|
||||
|
||||
ENDIF (CYGWIN OR MINGW)
|
||||
|
||||
ELSE (WIN32)
|
||||
|
||||
FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
|
||||
/usr/include/opencascade
|
||||
/usr/local/include/opencascade
|
||||
/opt/opencascade/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(OCC_LIBRARY TKernel
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/opencascade/lib
|
||||
)
|
||||
|
||||
ENDIF (WIN32)
|
||||
|
||||
|
||||
SET(OCC_FOUND FALSE)
|
||||
IF(OCC_LIBRARY)
|
||||
GET_FILENAME_COMPONENT(OCC_LIBRARY_DIR ${OCC_LIBRARY} PATH)
|
||||
SET(OCC_FOUND TRUE)
|
||||
set(OCC_LIBRARIES
|
||||
TKFillet
|
||||
TKMesh
|
||||
TKernel
|
||||
TKG2d
|
||||
TKG3d
|
||||
TKMath
|
||||
TKIGES
|
||||
TKSTL
|
||||
TKShHealing
|
||||
TKXSBase
|
||||
TKBool
|
||||
TKBO
|
||||
TKBRep
|
||||
TKTopAlgo
|
||||
TKGeomAlgo
|
||||
TKGeomBase
|
||||
TKOffset
|
||||
TKPrim
|
||||
TKSTEP
|
||||
TKSTEPBase
|
||||
TKSTEPAttr
|
||||
TKHLR
|
||||
TKFeat
|
||||
)
|
||||
set(OCC_OCAF_LIBRARIES
|
||||
TKCAF
|
||||
TKXCAF
|
||||
TKLCAF
|
||||
TKXDESTEP
|
||||
TKXDEIGES
|
||||
)
|
||||
ENDIF(OCC_LIBRARY)
|
||||
|
||||
@@ -1,128 +0,0 @@
|
||||
# Locate PyCXX headers and source files
|
||||
|
||||
# This module defines
|
||||
# PYCXX_INCLUDE_DIR
|
||||
# PYCXX_SOURCE_DIR
|
||||
# PYCXX_FOUND
|
||||
# PYCXX_SOURCES
|
||||
# PYCXX_VERSION
|
||||
#
|
||||
# The PYCXX_*_DIR variables can be set to tell this module where
|
||||
# the files are.
|
||||
|
||||
|
||||
# There's no standard location for PyCXX.
|
||||
#
|
||||
# The authors' example is to put it in "~\" [sic].
|
||||
#
|
||||
# Ubuntu puts the includes into /usr/include/python2.7/CXX and sources into
|
||||
# /usr/share/python2.7/CXX.
|
||||
#
|
||||
# The Zultron Fedora RPM does the same as Ubuntu.
|
||||
|
||||
set(PYCXX_FOUND "YES")
|
||||
|
||||
# find the header directory
|
||||
if(PYCXX_INCLUDE_DIR)
|
||||
# headers better be in there
|
||||
if(NOT EXISTS "${PYCXX_INCLUDE_DIR}/CXX/Config.hxx")
|
||||
if(PyCXX_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR
|
||||
"PyCXX: could not find CXX/Config.hxx in PYCXX_INCLUDE_DIR "
|
||||
"${PYCXX_INCLUDE_DIR}")
|
||||
else(PyCXX_FIND_REQUIRED)
|
||||
MESSAGE(WARNING
|
||||
"PyCXX: could not find CXX/Config.hxx in PYCXX_INCLUDE_DIR "
|
||||
"${PYCXX_INCLUDE_DIR}")
|
||||
unset(PYCXX_FOUND)
|
||||
endif(PyCXX_FIND_REQUIRED)
|
||||
endif(NOT EXISTS "${PYCXX_INCLUDE_DIR}/CXX/Config.hxx")
|
||||
else(PYCXX_INCLUDE_DIR)
|
||||
# check in 'standard' places
|
||||
find_path(PYCXX_INCLUDE_DIR CXX/Config.hxx
|
||||
${PYTHON_INCLUDE_DIR}
|
||||
"${CMAKE_CURRENT_LIST_DIR}/..")
|
||||
if(NOT PYCXX_INCLUDE_DIR)
|
||||
if(PyCXX_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR
|
||||
"PyCXX not found; please set PYCXX_INCLUDE_DIR to "
|
||||
"the location of CXX/Config.hxx")
|
||||
else(PyCXX_FIND_REQUIRED)
|
||||
MESSAGE(STATUS "PyCXX not found")
|
||||
unset(PYCXX_FOUND)
|
||||
endif(PyCXX_FIND_REQUIRED)
|
||||
endif(NOT PYCXX_INCLUDE_DIR)
|
||||
endif(PYCXX_INCLUDE_DIR)
|
||||
|
||||
# find the sources directory
|
||||
if(PYCXX_SOURCE_DIR)
|
||||
# source directory specified, they'd better be there
|
||||
if(NOT EXISTS "${PYCXX_SOURCE_DIR}/cxxextensions.c")
|
||||
if(PyCXX_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR
|
||||
"PyCXX: cxxextensions.c not found in PYCXX_SOURCE_DIR "
|
||||
"${PYCXX_SOURCE_DIR}")
|
||||
else(PyCXX_FIND_REQUIRED)
|
||||
MESSAGE(WARNING
|
||||
"PyCXX: cxxextensions.c not found in PYCXX_SOURCE_DIR "
|
||||
"${PYCXX_SOURCE_DIR}")
|
||||
unset(PYCXX_FOUND)
|
||||
endif(PyCXX_FIND_REQUIRED)
|
||||
endif(NOT EXISTS "${PYCXX_SOURCE_DIR}/cxxextensions.c")
|
||||
else(PYCXX_SOURCE_DIR)
|
||||
# check in 'standard' places
|
||||
find_path(PYCXX_SOURCE_DIR cxxextensions.c
|
||||
"${PYCXX_INCLUDE_DIR}/CXX"
|
||||
"${PYCXX_INCLUDE_DIR}/Src"
|
||||
"${PYTHON_INCLUDE_DIR}/CXX"
|
||||
"${PYTHON_INCLUDE_DIR}/Src"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/../Src"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/../CXX")
|
||||
if(NOT PYCXX_SOURCE_DIR)
|
||||
if(PyCXX_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR
|
||||
"PyCXX not found; please set PYCXX_SOURCE_DIR to "
|
||||
"the location of cxxextensions.c")
|
||||
else(PyCXX_FIND_REQUIRED)
|
||||
MESSAGE(STATUS "PyCXX not found")
|
||||
unset(PYCXX_FOUND)
|
||||
endif(PyCXX_FIND_REQUIRED)
|
||||
endif(NOT PYCXX_SOURCE_DIR)
|
||||
endif(PYCXX_SOURCE_DIR)
|
||||
|
||||
# Find PyCXX Version
|
||||
if(PYCXX_INCLUDE_DIR AND PYCXX_SOURCE_DIR)
|
||||
file(READ ${PYCXX_INCLUDE_DIR}/CXX/Version.hxx PYCXX_VERSION_H)
|
||||
foreach(item IN ITEMS MAJOR MINOR PATCH)
|
||||
string(REGEX REPLACE
|
||||
".*#define[ \t]+PYCXX_VERSION_${item}[ \t]+([0-9]+).*"
|
||||
"\\1" PYCXX_VERSION_${item}
|
||||
"${PYCXX_VERSION_H}"
|
||||
)
|
||||
endforeach()
|
||||
set(PYCXX_VERSION ${PYCXX_VERSION_MAJOR}.${PYCXX_VERSION_MINOR}.${PYCXX_VERSION_PATCH})
|
||||
endif()
|
||||
|
||||
# see what we've got
|
||||
if(PYCXX_FOUND)
|
||||
MESSAGE(STATUS "PyCXX found:")
|
||||
MESSAGE(STATUS " Headers: ${PYCXX_INCLUDE_DIR}")
|
||||
MESSAGE(STATUS " Sources: ${PYCXX_SOURCE_DIR}")
|
||||
MESSAGE(STATUS " Version: ${PYCXX_VERSION}")
|
||||
|
||||
# Build the list of sources for convenience
|
||||
set(PYCXX_SOURCES
|
||||
${PYCXX_SOURCE_DIR}/cxxextensions.c
|
||||
${PYCXX_SOURCE_DIR}/cxx_extensions.cxx
|
||||
${PYCXX_SOURCE_DIR}/cxxsupport.cxx
|
||||
${PYCXX_SOURCE_DIR}/IndirectPythonInterface.cxx
|
||||
)
|
||||
if(NOT ${PYCXX_VERSION} VERSION_LESS 6.3.0)
|
||||
list(APPEND PYCXX_SOURCES
|
||||
${PYCXX_SOURCE_DIR}/cxx_exceptions.cxx)
|
||||
add_definitions(-DPYCXX_6_2_COMPATIBILITY)
|
||||
endif()
|
||||
else(PYCXX_FOUND)
|
||||
MESSAGE(STATUS "PyCXX not found")
|
||||
endif(PYCXX_FOUND)
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
# Try to find PySide2 utilities, PYSIDE2UIC and PYSIDE2RCC:
|
||||
# PYSIDE_UIC_EXECUTABLE - Location of PYSIDE2UIC executable
|
||||
# PYSIDE_RCC_EXECUTABLE - Location of PYSIDE2RCC executable
|
||||
# PYSIDE_TOOLS_FOUND - PySide2 utilities found.
|
||||
|
||||
if(WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
#pyside2 tools are often in same location as python interpreter
|
||||
get_filename_component(PYTHON_BIN_DIR ${PYTHON_EXECUTABLE} PATH)
|
||||
set(PYSIDE_BIN_DIR ${PYTHON_BIN_DIR})
|
||||
endif(WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
|
||||
# Since Qt v5.14, pyside2-uic and pyside2-rcc are directly provided by Qt5Core uic and rcc, with '-g python' option
|
||||
# We test Qt5Core version to act accordingly
|
||||
|
||||
FIND_PACKAGE(Qt5 COMPONENTS Core Widgets)
|
||||
|
||||
IF(Qt5Core_VERSION VERSION_LESS 5.14)
|
||||
# Legacy (< 5.14)
|
||||
FIND_PROGRAM(PYSIDE2_UIC_EXECUTABLE NAMES python2-pyside2-uic pyside2-uic pyside2-uic-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} pyuic5 HINTS ${PYSIDE_BIN_DIR})
|
||||
FIND_PROGRAM(PYSIDE2_RCC_EXECUTABLE NAMES pyside2-rcc pyside2-rcc-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} pyrcc5 HINTS ${PYSIDE_BIN_DIR})
|
||||
set(UICOPTIONS "")
|
||||
set(RCCOPTIONS "")
|
||||
ELSE()
|
||||
# New (>= 5.14)
|
||||
if (TARGET Qt::uic)
|
||||
get_property(PYSIDE2_UIC_EXECUTABLE TARGET Qt::uic PROPERTY LOCATION)
|
||||
set(UICOPTIONS "--generator=python")
|
||||
endif()
|
||||
if (TARGET Qt::rcc)
|
||||
get_property(PYSIDE2_RCC_EXECUTABLE TARGET Qt::rcc PROPERTY LOCATION)
|
||||
set(RCCOPTIONS "--generator=python" "--compress-algo=zlib" "--compress=1")
|
||||
endif()
|
||||
ENDIF()
|
||||
|
||||
set(PYSIDE_RCC_EXECUTABLE ${PYSIDE2_RCC_EXECUTABLE})
|
||||
set(PYSIDE_UIC_EXECUTABLE ${PYSIDE2_UIC_EXECUTABLE})
|
||||
set(PySideTools_VERSION 2)
|
||||
|
||||
if(PYSIDE_RCC_EXECUTABLE AND PYSIDE_UIC_EXECUTABLE)
|
||||
set(PYSIDE_TOOLS_FOUND TRUE)
|
||||
if (NOT PySide2Tools_FIND_QUIETLY)
|
||||
message(STATUS "Found PySide2 tools: ${PYSIDE_UIC_EXECUTABLE}, ${PYSIDE_RCC_EXECUTABLE}")
|
||||
endif (NOT PySide2Tools_FIND_QUIETLY)
|
||||
else()
|
||||
if(PySide2Tools_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "PySide2 tools could not be found, but are required.")
|
||||
else(PySide2Tools_FIND_REQUIRED)
|
||||
if (NOT PySide2Tools_FIND_QUIETLY)
|
||||
message(STATUS "PySide2 tools: not found.")
|
||||
endif (NOT PySide2Tools_FIND_QUIETLY)
|
||||
endif(PySide2Tools_FIND_REQUIRED)
|
||||
endif()
|
||||
@@ -1,32 +0,0 @@
|
||||
# Try to find PYSIDE6 utilities, PYSIDE6UIC and PYSIDE6RCC:
|
||||
# PYSIDE_UIC_EXECUTABLE - Location of PYSIDE6UIC executable
|
||||
# PYSIDE_RCC_EXECUTABLE - Location of PYSIDE6RCC executable
|
||||
# PYSIDE_TOOLS_FOUND - PYSIDE6 utilities found.
|
||||
|
||||
if (TARGET Qt6::uic)
|
||||
get_target_property(PYSIDE6_UIC_EXECUTABLE Qt6::uic LOCATION)
|
||||
set(UICOPTIONS "--generator=python")
|
||||
endif()
|
||||
if (TARGET Qt6::rcc)
|
||||
get_target_property(PYSIDE6_RCC_EXECUTABLE Qt6::rcc LOCATION)
|
||||
set(RCCOPTIONS "--generator=python" "--compress-algo=zlib" "--compress=1")
|
||||
endif()
|
||||
|
||||
set(PYSIDE_RCC_EXECUTABLE ${PYSIDE6_RCC_EXECUTABLE})
|
||||
set(PYSIDE_UIC_EXECUTABLE ${PYSIDE6_UIC_EXECUTABLE})
|
||||
set(PySideTools_VERSION 6)
|
||||
|
||||
if(PYSIDE_RCC_EXECUTABLE AND PYSIDE_UIC_EXECUTABLE)
|
||||
set(PYSIDE_TOOLS_FOUND TRUE)
|
||||
if (NOT PYSIDE6Tools_FIND_QUIETLY)
|
||||
message(STATUS "Found PYSIDE6 tools: ${PYSIDE_UIC_EXECUTABLE}, ${PYSIDE_RCC_EXECUTABLE}")
|
||||
endif ()
|
||||
else()
|
||||
if(PYSIDE6Tools_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "PYSIDE6 tools could not be found, but are required.")
|
||||
else()
|
||||
if (NOT PYSIDE6Tools_FIND_QUIETLY)
|
||||
message(STATUS "PYSIDE6 tools: not found.")
|
||||
endif ()
|
||||
endif()
|
||||
endif()
|
||||
@@ -1,100 +0,0 @@
|
||||
# Find OCULUS
|
||||
#
|
||||
# This module defines
|
||||
# OCULUS_FOUND
|
||||
# OCULUS_INCLUDE_DIRS
|
||||
# OCULUS_LIBRARIES
|
||||
#
|
||||
# Copyright (c) 2012 I-maginer
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU Lesser General Public License as published by the Free Software
|
||||
# Foundation; either version 2 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 Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License along with
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place - Suite 330, Boston, MA 02111-1307, USA, or go to
|
||||
# http://www.gnu.org/copyleft/lesser.txt
|
||||
#
|
||||
|
||||
# On a new cmake run, we do not need to be verbose
|
||||
IF(OCULUS_INCLUDE_DIR AND OCULUS_LIBRARY)
|
||||
SET(OCULUS_FIND_QUIETLY FALSE)
|
||||
ENDIF()
|
||||
|
||||
# If OCULUS_ROOT was defined in the environment, use it.
|
||||
if (NOT OCULUS_ROOT)
|
||||
if(NOT "$ENV{OCULUS_ROOT}" STREQUAL "")
|
||||
set(OCULUS_ROOT $ENV{OCULUS_ROOT})
|
||||
else()
|
||||
set(OCULUS_ROOT $ENV{SCOL_DEPENDENCIES_PATH}/oculus/LibOVR)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# concat all the search paths
|
||||
IF(OCULUS_ROOT)
|
||||
SET(OCULUS_INCLUDE_SEARCH_DIRS
|
||||
${OCULUS_INCLUDE_SEARCH_DIRS}
|
||||
${OCULUS_ROOT}/include
|
||||
)
|
||||
SET(OCULUS_LIBRARY_SEARCH_RELEASE_DIRS
|
||||
${OCULUS_LIBRARY_SEARCH_DIRS}
|
||||
${OCULUS_ROOT}/Lib/x64/VS2012
|
||||
)
|
||||
SET(OCULUS_LIBRARY_SEARCH_DEBUG_DIRS
|
||||
${OCULUS_LIBRARY_SEARCH_DIRS}
|
||||
${OCULUS_ROOT}/Lib/x64/VS2012
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
# log message
|
||||
IF (NOT OCULUS_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Checking for OCULUS library")
|
||||
ENDIF()
|
||||
|
||||
# Search for header files
|
||||
FIND_PATH(OCULUS_INCLUDE_DIR OVR.h
|
||||
PATHS ${OCULUS_INCLUDE_SEARCH_DIRS})
|
||||
|
||||
# Search for libraries files (release mode)
|
||||
FIND_LIBRARY(OCULUS_LIBRARY_RELEASE libovr64
|
||||
PATHS ${OCULUS_LIBRARY_SEARCH_RELEASE_DIRS})
|
||||
|
||||
# Search for libraries files (debug mode)
|
||||
FIND_LIBRARY(OCULUS_LIBRARY_DEBUG libovr64d
|
||||
PATHS ${OCULUS_LIBRARY_SEARCH_DEBUG_DIRS})
|
||||
|
||||
# Configure libraries for debug/release
|
||||
SET(OCULUS_INCLUDE_DIRS ${OCULUS_INCLUDE_DIR} CACHE PATH "Directory containing OCULUS header files")
|
||||
SET(OCULUS_LIBRARY debug ${OCULUS_LIBRARY_DEBUG} optimized ${OCULUS_LIBRARY_RELEASE})
|
||||
SET(OCULUS_LIBRARIES ${OCULUS_LIBRARY} CACHE STRING "OCULUS libraries files")
|
||||
|
||||
#IF(OCULUS_INCLUDE_DIR AND OCULUS_LIBRARY)
|
||||
SET(OCULUS_FOUND TRUE)
|
||||
#ENDIF()
|
||||
|
||||
# Hide those variables in GUI
|
||||
SET(OCULUS_INCLUDE_DIR ${OCULUS_INCLUDE_DIR} CACHE INTERNAL "")
|
||||
SET(OCULUS_LIBRARY_RELEASE ${OCULUS_LIBRARY_RELEASE} CACHE INTERNAL "")
|
||||
SET(OCULUS_LIBRARY_DEBUG ${OCULUS_LIBRARY_DEBUG} CACHE INTERNAL "")
|
||||
SET(OCULUS_LIBRARY ${OCULUS_LIBRARY} CACHE INTERNAL "")
|
||||
|
||||
# log find result
|
||||
IF(OCULUS_FOUND)
|
||||
IF(NOT OCULUS_FIND_QUIETLY)
|
||||
MESSAGE(STATUS " libraries: ${OCULUS_LIBRARIES}")
|
||||
MESSAGE(STATUS " includes: ${OCULUS_INCLUDE_DIRS}")
|
||||
ENDIF()
|
||||
ELSE(OCULUS_FOUND)
|
||||
IF(NOT OCULUS_LIBRARIES)
|
||||
MESSAGE(STATUS, "OCULUS library or one of it dependencies could not be found.")
|
||||
ENDIF()
|
||||
IF(NOT OCULUS_INCLUDE_DIRS)
|
||||
MESSAGE(STATUS "OCULUS include files could not be found.")
|
||||
ENDIF()
|
||||
ENDIF(OCULUS_FOUND)
|
||||
+7
-39
@@ -5,50 +5,21 @@
|
||||
# SMESH_INCLUDE_DIR - where the Salome SMESH include directory can be found
|
||||
# SMESH_LIBRARIES - Link this to use Salome SMESH
|
||||
#
|
||||
|
||||
# SMESH needs VTK
|
||||
find_package(VTK REQUIRED)
|
||||
|
||||
# If this definition is not set, linker errors will occur against SMESH on 64 bit machines.
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
add_definitions(-DSALOME_USE_64BIT_IDS)
|
||||
endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
|
||||
|
||||
IF (CMAKE_COMPILER_IS_GNUCC)
|
||||
FIND_PATH(SMESH_INCLUDE_DIR SMESH_Mesh.hxx
|
||||
# These are default search paths, why specify them?
|
||||
PATH_SUFFIXES smesh SMESH smesh/SMESH
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
)
|
||||
FIND_LIBRARY(SMESH_LIBRARY SMESH
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
)
|
||||
FIND_LIBRARY(SMESH_LIBRARY SMESH)
|
||||
ELSE (CMAKE_COMPILER_IS_GNUCC)
|
||||
# Not yet implemented
|
||||
ENDIF (CMAKE_COMPILER_IS_GNUCC)
|
||||
|
||||
IF(SMESH_INCLUDE_DIR)
|
||||
SET(SMESH_INC_ROOT "${SMESH_INCLUDE_DIR}/..")
|
||||
# Append extra include dirs
|
||||
SET(SMESH_INCLUDE_DIR
|
||||
"${SMESH_INCLUDE_DIR};
|
||||
${SMESH_INC_ROOT}/Controls;
|
||||
${SMESH_INC_ROOT}/Driver;
|
||||
${SMESH_INC_ROOT}/DriverDAT;
|
||||
${SMESH_INC_ROOT}/DriverGMF;
|
||||
${SMESH_INC_ROOT}/DriverSTL;
|
||||
${SMESH_INC_ROOT}/DriverUNV;
|
||||
${SMESH_INC_ROOT}/Geom;
|
||||
${SMESH_INC_ROOT}/Kernel;
|
||||
${SMESH_INC_ROOT}/MEFISTO2;
|
||||
${SMESH_INC_ROOT}/MeshVSLink;
|
||||
${SMESH_INC_ROOT}/Netgen;
|
||||
${SMESH_INC_ROOT}/NETGENPlugin;
|
||||
${SMESH_INC_ROOT}/SMDS;
|
||||
${SMESH_INC_ROOT}/SMESHDS;
|
||||
${SMESH_INC_ROOT}/SMESHUtils;
|
||||
${SMESH_INC_ROOT}/StdMeshers;")
|
||||
ELSE(SMESH_INCLUDE_DIR)
|
||||
message(FATAL_ERROR "SMESH include directories not found!")
|
||||
ENDIF(SMESH_INCLUDE_DIR)
|
||||
|
||||
SET(SMESH_FOUND FALSE)
|
||||
IF(SMESH_LIBRARY)
|
||||
SET(SMESH_FOUND TRUE)
|
||||
@@ -63,8 +34,5 @@ IF(SMESH_LIBRARY)
|
||||
${SMESH_LIBRARY_DIR}/libSMESHDS.so
|
||||
${SMESH_LIBRARY_DIR}/libStdMeshers.so
|
||||
)
|
||||
set(EXTERNAL_SMESH_LIBS ${SMESH_LIBRARIES})
|
||||
ELSE(SMESH_LIBRARY)
|
||||
message(FATAL_ERROR "SMESH libraries NOT FOUND!")
|
||||
ENDIF(SMESH_LIBRARY)
|
||||
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
#############################################################################
|
||||
# Description:
|
||||
# Try to find SoQt library.
|
||||
# Once run this will define:
|
||||
#
|
||||
# SOQT_FOUND
|
||||
# SOQT_LIBRARIES
|
||||
# SOQT_LIBRARY_RELEASE
|
||||
# SOQT_LIBRARY_DEBUG
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
|
||||
|
||||
|
||||
IF(UNIX OR WIN32)
|
||||
|
||||
IF(WIN32)
|
||||
IF(MINGW)
|
||||
FIND_LIBRARY(SOQT_LIBRARY
|
||||
NAMES SoQt #only shared libraries under windows
|
||||
PATHS
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/lib
|
||||
"$ENV{COINDIR}/lib"
|
||||
)
|
||||
ELSE(MINGW)
|
||||
FIND_LIBRARY(SOQT_LIBRARY_RELEASE
|
||||
#only shared libraries under windows
|
||||
NAMES soqt1
|
||||
PATHS
|
||||
"$ENV{COINDIR}/lib"
|
||||
)
|
||||
FIND_LIBRARY(SOQT_LIBRARY_DEBUG
|
||||
NAMES soqt1d #only shared libraries under windows
|
||||
PATHS
|
||||
"$ENV{COINDIR}/lib"
|
||||
)
|
||||
|
||||
FIND_PATH(SOQT_INCLUDE_PATH Inventor/Qt/SoQt.h
|
||||
"$ENV{COINDIR}/include"
|
||||
"$ENV{INCLUDE}"
|
||||
)
|
||||
MARK_AS_ADVANCED(
|
||||
SOQT_LIBRARY_DEBUG
|
||||
SOQT_LIBRARY_RELEASE
|
||||
SOQT_INCLUDE_PATH
|
||||
)
|
||||
ENDIF(MINGW)
|
||||
ELSE(WIN32)
|
||||
FIND_LIBRARY(SOQT_LIBRARY
|
||||
NAMES SoQt #only shared libraries under windows
|
||||
PATHS
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/lib
|
||||
"$ENV{COINDIR}/lib"
|
||||
)
|
||||
|
||||
#MESSAGE(STATUS "DBG SOQT_LIBRARY=${SOQT_LIBRARY}")
|
||||
|
||||
ENDIF(WIN32)
|
||||
|
||||
## --------------------------------
|
||||
|
||||
IF(SOQT_LIBRARY OR SOQT_LIBRARY_DEBUG OR SOQT_LIBRARY_RELEASE)
|
||||
|
||||
IF(WIN32)
|
||||
IF(SOQT_LIBRARY_RELEASE AND NOT SOQT_LIBRARY_DEBUG)
|
||||
SET(SOQT_LIBRARY_RELEASE ${SOQT_LIBRARY_RELEASE})
|
||||
ENDIF(SOQT_LIBRARY_RELEASE AND NOT SOQT_LIBRARY_DEBUG)
|
||||
IF(SOQT_LIBRARY_DEBUG AND NOT SOQT_LIBRARY_RELEASE)
|
||||
SET(SOQT_LIBRARY_DEBUG ${SOQT_LIBRARY_DEBUG})
|
||||
ENDIF(SOQT_LIBRARY_DEBUG AND NOT SOQT_LIBRARY_RELEASE)
|
||||
IF(SOQT_LIBRARY_RELEASE AND SOQT_LIBRARY_DEBUG)
|
||||
SET(SOQT_LIBRARY_RELEASE ${SOQT_LIBRARY_RELEASE})
|
||||
SET(SOQT_LIBRARY_DEBUG ${SOQT_LIBRARY_DEBUG})
|
||||
ENDIF(SOQT_LIBRARY_RELEASE AND SOQT_LIBRARY_DEBUG)
|
||||
IF(MINGW)
|
||||
SET(SOQT_LIBRARIES ${SOQT_LIBRARY})
|
||||
MARK_AS_ADVANCED(
|
||||
SOQT_LIBRARIES
|
||||
SOQT_LIBRARY
|
||||
)
|
||||
ENDIF(MINGW)
|
||||
ELSE(WIN32)
|
||||
SET(SOQT_LIBRARIES ${SOQT_LIBRARY})
|
||||
MARK_AS_ADVANCED(
|
||||
SOQT_LIBRARIES
|
||||
SOQT_LIBRARY
|
||||
)
|
||||
ENDIF(WIN32)
|
||||
SET(SOQT_FOUND TRUE)
|
||||
ELSE(SOQT_LIBRARY OR SOQT_LIBRARY_DEBUG OR SOQT_LIBRARY_RELEASE)
|
||||
SET(SOQT_FOUND FALSE)
|
||||
#MESSAGE("SoQt library not found.")
|
||||
ENDIF(SOQT_LIBRARY OR SOQT_LIBRARY_DEBUG OR SOQT_LIBRARY_RELEASE)
|
||||
|
||||
IF(WIN32)
|
||||
IF(SOQT_INCLUDE_PATH)
|
||||
set(SOQT_INCLUDE_DIR ${SOQT_INCLUDE_PATH})
|
||||
ELSE(SOQT_INCLUDE_PATH)
|
||||
#MESSAGE("Can not find SoQt includes")
|
||||
ENDIF(SOQT_INCLUDE_PATH)
|
||||
MARK_AS_ADVANCED(
|
||||
SOQT_INCUDE_DIR
|
||||
)
|
||||
ENDIF(WIN32)
|
||||
|
||||
#MESSAGE(STATUS "SOQT_FOUND : ${SOQT_FOUND}")
|
||||
|
||||
ELSE(UNIX OR WIN32)
|
||||
SET(SOQT_FOUND FALSE)
|
||||
ENDIF(UNIX OR WIN32)
|
||||
@@ -24,6 +24,6 @@ if(SPNAV_FOUND)
|
||||
set(SPNAV_LIBRARIES ${SPNAV_LIBRARY})
|
||||
endif()
|
||||
|
||||
mark_as_advanced(SPNAV_LIBRARY SPNAV_INCLUDE_DIR)
|
||||
mark_as_advanced(SPANV_LIBRARY SPNAV_INCLUDE_DIR)
|
||||
|
||||
ENDIF(UNIX)
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
# - Try to find Windows Installer XML
|
||||
# See http://wix.sourceforge.net
|
||||
#
|
||||
# The follwoing variables are optionally searched for defaults
|
||||
# WIX_ROOT_DIR: Base directory of WIX2 tree to use.
|
||||
#
|
||||
# The following are set after configuration is done:
|
||||
# WIX_FOUND
|
||||
# WIX_ROOT_DIR
|
||||
# WIX_CANDLE
|
||||
# WIX_LIGHT
|
||||
#
|
||||
# 2009/02 Petr Pytelka (pyta at lightcomp.cz)
|
||||
#
|
||||
|
||||
MACRO(DBG_MSG _MSG)
|
||||
# MESSAGE(STATUS "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}):\n ${_MSG}")
|
||||
ENDMACRO(DBG_MSG)
|
||||
|
||||
|
||||
# typical root dirs of installations, exactly one of them is used
|
||||
SET (WIX_POSSIBLE_ROOT_DIRS
|
||||
"${WIX_ROOT_DIR}"
|
||||
"$ENV{WIX_ROOT_DIR}"
|
||||
"$ENV{ProgramFiles}/Windows Installer XML"
|
||||
)
|
||||
|
||||
|
||||
#DBG_MSG("DBG (WIX_POSSIBLE_ROOT_DIRS=${WIX_POSSIBLE_ROOT_DIRS}")
|
||||
|
||||
#
|
||||
# select exactly ONE WIX base directory/tree
|
||||
# to avoid mixing different version headers and libs
|
||||
#
|
||||
FIND_PATH(WIX_ROOT_DIR
|
||||
NAMES
|
||||
bin/candle.exe
|
||||
bin/light.exe
|
||||
PATHS ${WIX_POSSIBLE_ROOT_DIRS})
|
||||
DBG_MSG("WIX_ROOT_DIR=${WIX_ROOT_DIR}")
|
||||
|
||||
|
||||
#
|
||||
# Logic selecting required libs and headers
|
||||
#
|
||||
SET(WIX_FOUND OFF)
|
||||
IF(WIX_ROOT_DIR)
|
||||
SET(WIX_FOUND ON)
|
||||
ENDIF(WIX_ROOT_DIR)
|
||||
|
||||
|
||||
# display help message
|
||||
IF(NOT WIX_FOUND)
|
||||
# make FIND_PACKAGE friendly
|
||||
IF(NOT WIX_FIND_QUIETLY)
|
||||
IF(WIX_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR
|
||||
"Windows Installer XML required but some files not found. Please specify it's location with WIX_ROOT_DIR env. variable.")
|
||||
ELSE(WIX_FIND_REQUIRED)
|
||||
MESSAGE(STATUS
|
||||
"ERROR: Windows Installer XML was not found.")
|
||||
ENDIF(WIX_FIND_REQUIRED)
|
||||
ENDIF(NOT WIX_FIND_QUIETLY)
|
||||
ELSE(NOT WIX_FOUND)
|
||||
SET(WIX_CANDLE ${WIX_ROOT_DIR}/bin/candle.exe)
|
||||
SET(WIX_LIGHT ${WIX_ROOT_DIR}/bin/light.exe)
|
||||
# MESSAGE(STATUS "Windows Installer XML found.")
|
||||
ENDIF(NOT WIX_FOUND)
|
||||
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
WIX_ROOT_DIR
|
||||
WIX_CANDLE
|
||||
WIX_LIGHT
|
||||
)
|
||||
|
||||
#
|
||||
# Call wix compiler
|
||||
#
|
||||
# Parameters:
|
||||
# _sources - name of list with sources
|
||||
# _obj - name of list for target objects
|
||||
#
|
||||
MACRO(WIX_COMPILE _sources _objs _extra_dep)
|
||||
DBG_MSG("WIX compile: ${${_sources}}")
|
||||
FOREACH (_current_FILE ${${_sources}})
|
||||
GET_FILENAME_COMPONENT(_tmp_FILE ${_current_FILE} ABSOLUTE)
|
||||
GET_FILENAME_COMPONENT(_basename ${_tmp_FILE} NAME_WE)
|
||||
|
||||
SET (SOURCE_WIX_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${_current_FILE} )
|
||||
DBG_MSG("WIX source file: ${SOURCE_WIX_FILE}")
|
||||
|
||||
# Check whether source exists
|
||||
IF(EXISTS ${SOURCE_WIX_FILE})
|
||||
ELSE(EXISTS ${SOURCE_WIX_FILE})
|
||||
MESSAGE(FATAL_ERROR "Path not exists: ${SOURCE_WIX_FILE}")
|
||||
ENDIF(EXISTS ${SOURCE_WIX_FILE})
|
||||
|
||||
SET (OUTPUT_WIXOBJ ${_basename}.wixobj )
|
||||
|
||||
DBG_MSG("WIX output: ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_WIXOBJ}")
|
||||
DBG_MSG("WIX command: ${WIX_CANDLE}")
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_WIXOBJ}
|
||||
COMMAND ${WIX_CANDLE}
|
||||
ARGS ${WIX_CANDLE_FLAGS} ${SOURCE_WIX_FILE}
|
||||
DEPENDS ${SOURCE_WIX_FILE} ${${_extra_dep}}
|
||||
COMMENT "Compiling ${SOURCE_WIX_FILE} -> ${OUTPUT_WIXOBJ}"
|
||||
)
|
||||
SET(${_objs} ${${_objs}} ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_WIXOBJ} )
|
||||
DBG_MSG("WIX compile output: ${${_objs}}")
|
||||
|
||||
ENDFOREACH (_current_FILE)
|
||||
ENDMACRO(WIX_COMPILE)
|
||||
|
||||
#
|
||||
# Call wix compiler
|
||||
#
|
||||
# Parameters:
|
||||
# _sources - name of list with sources
|
||||
# _obj - name of list for target objects
|
||||
#
|
||||
MACRO(WIX_COMPILE_ALL _target _sources _extra_dep)
|
||||
DBG_MSG("WIX compile all: ${${_sources}}, dependencies: ${${_extra_dep}}")
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${_target}
|
||||
COMMAND ${WIX_CANDLE}
|
||||
ARGS ${WIX_CANDLE_FLAGS} -out "${_target}" ${${_sources}}
|
||||
DEPENDS ${${_sources}} ${${_extra_dep}}
|
||||
COMMENT "Compiling ${${_sources}} -> ${_target}"
|
||||
)
|
||||
|
||||
ENDMACRO(WIX_COMPILE_ALL)
|
||||
|
||||
|
||||
#
|
||||
# Link MSI file
|
||||
#
|
||||
# Parameters
|
||||
# _target - Name of target file
|
||||
# _sources - Name of list with sources
|
||||
#
|
||||
MACRO(WIX_LINK _target _sources _loc_files)
|
||||
DBG_MSG("WIX command: ${WIX_LIGHT}\n WIX target: ${_target} objs: ${${_sources}}")
|
||||
|
||||
SET( WIX_LINK_FLAGS_A "" )
|
||||
# Add localization
|
||||
FOREACH (_current_FILE ${${_loc_files}})
|
||||
SET( WIX_LINK_FLAGS_A ${WIX_LINK_FLAGS_A} -loc "${_current_FILE}" )
|
||||
DBG_MSG("WIX link localization: ${_current_FILE}")
|
||||
ENDFOREACH (_current_FILE)
|
||||
DBG_MSG("WIX link flags: ${WIX_LINK_FLAGS_A}")
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${_target}
|
||||
COMMAND ${WIX_LIGHT}
|
||||
ARGS ${WIX_LINK_FLAGS_A} -out "${_target}" ${${_sources}}
|
||||
DEPENDS ${${_sources}}
|
||||
COMMENT "Linking ${${_sources}} -> ${_target}"
|
||||
)
|
||||
|
||||
ENDMACRO(WIX_LINK)
|
||||
@@ -0,0 +1,48 @@
|
||||
# Locate Xerces-C include paths and libraries
|
||||
# Xerces-C can be found at http://xml.apache.org/xerces-c/
|
||||
# Written by Frederic Heem, frederic.heem _at_ telsey.it
|
||||
# Modified by Jos van den Oever
|
||||
|
||||
# This module defines
|
||||
# XERCESC_INCLUDE_DIR, where to find ptlib.h, etc.
|
||||
# XERCESC_LIBRARIES, the libraries to link against to use pwlib.
|
||||
# XERCESC_FOUND, If false, don't try to use pwlib.
|
||||
|
||||
FIND_PATH(XERCESC_INCLUDE_DIR xercesc/dom/DOM.hpp
|
||||
"[HKEY_CURRENT_USER\\software\\xerces-c\\src]"
|
||||
"[HKEY_CURRENT_USER\\xerces-c\\src]"
|
||||
$ENV{XERCESCROOT}/src/
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(XERCESC_LIBRARIES
|
||||
NAMES
|
||||
xerces-c
|
||||
PATHS
|
||||
"[HKEY_CURRENT_USER\\software\\xerces-c\\lib]"
|
||||
"[HKEY_CURRENT_USER\\xerces-c\\lib]"
|
||||
$ENV{XERCESCROOT}/${LIB_DESTINATION}
|
||||
/usr/local/${LIB_DESTINATION}
|
||||
/usr/${LIB_DESTINATION}
|
||||
)
|
||||
|
||||
# if the include a the library are found then we have it
|
||||
IF(XERCESC_INCLUDE_DIR AND XERCESC_LIBRARIES)
|
||||
SET(XERCESC_FOUND "YES" )
|
||||
IF(NOT XERCESC__FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found Xerces-C: ${XERCESC_LIBRARIES}")
|
||||
ENDIF(NOT XERCESC__FIND_QUIETLY)
|
||||
ELSE(XERCESC_INCLUDE_DIR AND XERCESC_LIBRARIES)
|
||||
IF(XERCESC_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Xerces-C was not found.")
|
||||
ENDIF(XERCESC_FIND_REQUIRED)
|
||||
IF(NOT XERCESC__FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Xerces-C was not found.")
|
||||
ENDIF(NOT XERCESC__FIND_QUIETLY)
|
||||
ENDIF(XERCESC_INCLUDE_DIR AND XERCESC_LIBRARIES)
|
||||
|
||||
#MARK_AS_ADVANCED(
|
||||
# XERCESC_INCLUDE_DIR
|
||||
# XERCESC_LIBRARIES
|
||||
#)
|
||||
@@ -1,9 +0,0 @@
|
||||
macro(BuildAndInstallDesignerPlugin)
|
||||
# =================================================================
|
||||
# ============= Build and install the designer plugin =============
|
||||
# =================================================================
|
||||
|
||||
if(BUILD_DESIGNER_PLUGIN)
|
||||
add_subdirectory(src/Tools/plugins/widget)
|
||||
endif(BUILD_DESIGNER_PLUGIN)
|
||||
endmacro(BuildAndInstallDesignerPlugin)
|
||||
@@ -1,8 +0,0 @@
|
||||
file(GLOB FREECAD_HELPER_CMAKE_FILES ./*.cmake)
|
||||
set(_SKIP_FILES "SetupQt.cmake")
|
||||
foreach(_CMAKE_FILE ${FREECAD_HELPER_CMAKE_FILES})
|
||||
get_filename_component(_FILENAME ${_CMAKE_FILE} NAME)
|
||||
if (NOT _FILENAME IN_LIST _SKIP_FILES)
|
||||
include(${_CMAKE_FILE})
|
||||
endif()
|
||||
endforeach(_CMAKE_FILE ${FREECAD_HELPER_CMAKE_FILES})
|
||||
@@ -1,41 +0,0 @@
|
||||
macro(CheckInterModuleDependencies)
|
||||
# ==============================================================================
|
||||
#inter-module dependencies
|
||||
|
||||
# Takes a dependent module followed by a variable-length list of prerequisite
|
||||
# modules. Warns if any of the prerequisite modules are disabled.
|
||||
function(REQUIRES_MODS dependent)
|
||||
if(${dependent})
|
||||
foreach(prerequisite IN LISTS ARGN)
|
||||
if(NOT ${prerequisite})
|
||||
message(STATUS "${dependent} requires ${prerequisite} to be ON, but it"
|
||||
" is \"${${prerequisite}}\"")
|
||||
set(${dependent} OFF PARENT_SCOPE)
|
||||
break()
|
||||
endif(NOT ${prerequisite})
|
||||
endforeach()
|
||||
endif(${dependent})
|
||||
endfunction(REQUIRES_MODS)
|
||||
|
||||
REQUIRES_MODS(BUILD_ARCH BUILD_PART BUILD_MESH BUILD_DRAFT)
|
||||
REQUIRES_MODS(BUILD_DRAFT BUILD_SKETCHER)
|
||||
REQUIRES_MODS(BUILD_DRAWING BUILD_PART BUILD_SPREADSHEET)
|
||||
REQUIRES_MODS(BUILD_FEM BUILD_PART)
|
||||
REQUIRES_MODS(BUILD_IDF BUILD_PART)
|
||||
REQUIRES_MODS(BUILD_IMPORT BUILD_PART)
|
||||
REQUIRES_MODS(BUILD_INSPECTION BUILD_MESH BUILD_POINTS BUILD_PART)
|
||||
REQUIRES_MODS(BUILD_JTREADER BUILD_MESH)
|
||||
REQUIRES_MODS(BUILD_MESH_PART BUILD_PART BUILD_MESH BUILD_SMESH)
|
||||
REQUIRES_MODS(BUILD_FLAT_MESH BUILD_MESH_PART)
|
||||
REQUIRES_MODS(BUILD_OPENSCAD BUILD_MESH_PART BUILD_DRAFT)
|
||||
REQUIRES_MODS(BUILD_PART_DESIGN BUILD_SKETCHER)
|
||||
# REQUIRES_MODS(BUILD_PATH BUILD_PART BUILD_MESH BUILD_ROBOT)
|
||||
REQUIRES_MODS(BUILD_PATH BUILD_PART BUILD_MESH)
|
||||
REQUIRES_MODS(BUILD_REVERSEENGINEERING BUILD_PART BUILD_MESH)
|
||||
REQUIRES_MODS(BUILD_ROBOT BUILD_PART)
|
||||
REQUIRES_MODS(BUILD_SANDBOX BUILD_PART BUILD_MESH)
|
||||
REQUIRES_MODS(BUILD_SKETCHER BUILD_PART)
|
||||
REQUIRES_MODS(BUILD_SPREADSHEET BUILD_DRAFT)
|
||||
REQUIRES_MODS(BUILD_START BUILD_WEB)
|
||||
REQUIRES_MODS(BUILD_TECHDRAW BUILD_PART BUILD_SPREADSHEET)
|
||||
endmacro(CheckInterModuleDependencies)
|
||||
@@ -1,88 +0,0 @@
|
||||
# ADAPTED FOR FREECAD FROM VTK'S vtkQt.cmake
|
||||
# ORIGINAL VTK COPYRIGHT NOTICE FOLLOWS (BSD 3-CLAUSE)
|
||||
#
|
||||
# /*=========================================================================
|
||||
#
|
||||
# Program: Visualization Toolkit
|
||||
# Module: Copyright.txt
|
||||
#
|
||||
# Copyright (c) 1993-2015 Ken Martin, Will Schroeder, Bill Lorensen
|
||||
# All rights reserved.
|
||||
#
|
||||
# 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 name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
|
||||
# of any 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 AUTHORS 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.
|
||||
#
|
||||
# =========================================================================*/
|
||||
|
||||
|
||||
# FREECAD_QT_VERSION is used to choose between Qt5 and Qt6.
|
||||
|
||||
# If it is set to Auto(default), FreeCAD finds and uses the
|
||||
# version installed on the system. If both versions are
|
||||
# found, Qt5 is preferred.
|
||||
|
||||
# The output variable is FREECAD_QT_MAJOR_VERSION, which will be either 5 or 6
|
||||
|
||||
macro(ChooseQtVersion)
|
||||
set(freecad_supported_qt_versions "Auto" 5 6)
|
||||
|
||||
# The following `if` check can be removed once CMake 3.21 is required and
|
||||
# the policy CMP0126 is set to NEW.
|
||||
if (NOT DEFINED FREECAD_QT_VERSION)
|
||||
set(FREECAD_QT_VERSION "Auto" CACHE
|
||||
STRING "Expected Qt major version. Valid values are Auto, 5, 6.")
|
||||
set_property(CACHE FREECAD_QT_VERSION PROPERTY STRINGS "${freecad_supported_qt_versions}")
|
||||
endif()
|
||||
|
||||
if(FREECAD_LIBPACK_USE)
|
||||
if (NOT Qt5_DIR OR Qt5_DIR STREQUAL "Qt5_DIR-NOTFOUND")
|
||||
message(STATUS "Using Qt5 directory from LibPack in ${FREECAD_LIBPACK_DIR}/lib/cmake/Qt5")
|
||||
set(Qt5_DIR ${FREECAD_LIBPACK_DIR}/lib/cmake/Qt5)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT FREECAD_QT_VERSION STREQUAL "Auto")
|
||||
if (NOT FREECAD_QT_VERSION IN_LIST freecad_supported_qt_versions)
|
||||
message(FATAL_ERROR
|
||||
"Supported Qt versions are \"${freecad_supported_qt_versions}\". But "
|
||||
"FREECAD_QT_VERSION is set to ${FREECAD_QT_VERSION}.")
|
||||
endif ()
|
||||
set(_FREECAD_QT_VERSION "${FREECAD_QT_VERSION}")
|
||||
else ()
|
||||
find_package(Qt5 QUIET COMPONENTS Core)
|
||||
set(_FREECAD_QT_VERSION 5)
|
||||
if (NOT Qt5_FOUND)
|
||||
find_package(Qt6 QUIET COMPONENTS Core)
|
||||
if (NOT Qt6_FOUND)
|
||||
message(FATAL_ERROR
|
||||
"Could not find a valid Qt installation. Consider setting Qt5_DIR or Qt6_DIR (as needed).")
|
||||
endif ()
|
||||
set(_FREECAD_QT_VERSION 6)
|
||||
endif ()
|
||||
endif ()
|
||||
set(FREECAD_QT_MAJOR_VERSION "${_FREECAD_QT_VERSION}" CACHE INTERNAL
|
||||
"Major version number for the Qt installation used.")
|
||||
message(STATUS "Compiling with Qt ${FREECAD_QT_MAJOR_VERSION}")
|
||||
endmacro()
|
||||
@@ -1,104 +0,0 @@
|
||||
# Some resources
|
||||
# https://github.com/dev-cafe/cmake-cookbook
|
||||
# https://cmake.org/cmake/help/v3.8/manual/cmake-compile-features.7.html
|
||||
|
||||
macro(CompilerChecksAndSetups)
|
||||
if (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
|
||||
set(CMAKE_COMPILER_IS_CLANGXX TRUE)
|
||||
endif (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
|
||||
|
||||
# ================================================================================
|
||||
|
||||
# Needed for boost1.69
|
||||
# Avoid that Python (pyerrors.h) defines snprintf and vsnprintf
|
||||
if (MSVC AND NOT MSVC_VERSION VERSION_LESS 1900)
|
||||
add_definitions(-DHAVE_SNPRINTF)
|
||||
elseif (MINGW)
|
||||
add_definitions(-DHAVE_SNPRINTF)
|
||||
endif()
|
||||
|
||||
# Allow developers to use Boost < 1.65
|
||||
if (NOT BOOST_MIN_VERSION)
|
||||
set(BOOST_MIN_VERSION 1.65)
|
||||
endif()
|
||||
|
||||
# For older cmake versions the variable 'CMAKE_CXX_COMPILER_VERSION' is missing
|
||||
if(CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_CXX_COMPILER_VERSION)
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
|
||||
OUTPUT_VARIABLE CMAKE_CXX_COMPILER_VERSION)
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_CXX_COMPILER_VERSION)
|
||||
|
||||
# Enabled C++17 for Freecad 0.20 and later
|
||||
set(BUILD_ENABLE_CXX_STD "C++17" CACHE STRING "Enable C++ standard")
|
||||
set_property(CACHE BUILD_ENABLE_CXX_STD PROPERTY STRINGS
|
||||
"C++17"
|
||||
"C++20"
|
||||
)
|
||||
|
||||
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.3)
|
||||
message(FATAL_ERROR "FreeCAD 0.20 and later requires C++17. G++ must be 7.3 or later, the used version is ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
elseif(CMAKE_COMPILER_IS_CLANGXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0)
|
||||
message(FATAL_ERROR "FreeCAD 0.20 and later requires C++17. Clang must be 6.0 or later, the used version is ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
endif()
|
||||
|
||||
# Escape the two plus chars as otherwise cmake complains about invalid regex
|
||||
if(${BUILD_ENABLE_CXX_STD} MATCHES "C\\+\\+20")
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
elseif(${BUILD_ENABLE_CXX_STD} MATCHES "C\\+\\+17")
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
endif()
|
||||
|
||||
# Log the compiler and version
|
||||
message(STATUS "Compiler: ${CMAKE_CXX_COMPILER_ID}, version: ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
|
||||
include(${CMAKE_SOURCE_DIR}/cMake/ConfigureChecks.cmake)
|
||||
configure_file(${CMAKE_SOURCE_DIR}/src/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
add_definitions(-DHAVE_CONFIG_H)
|
||||
|
||||
# For now only set pedantic option for clang
|
||||
if(CMAKE_COMPILER_IS_CLANGXX)
|
||||
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wpedantic -Wno-write-strings ${CMAKE_CXX_FLAGS}")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-write-strings ${CMAKE_CXX_FLAGS}")
|
||||
endif()
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
# get linker errors as soon as possible and not at runtime e.g. for modules
|
||||
if(BUILD_DYNAMIC_LINK_PYTHON)
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined,error")
|
||||
elseif(UNIX)
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
|
||||
endif()
|
||||
else(BUILD_DYNAMIC_LINK_PYTHON)
|
||||
if(CMAKE_COMPILER_IS_CLANGXX)
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined,dynamic_lookup")
|
||||
endif()
|
||||
endif(BUILD_DYNAMIC_LINK_PYTHON)
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
|
||||
|
||||
if(CMAKE_COMPILER_IS_CLANGXX)
|
||||
# Disable warning about potentially uninstantiated static members
|
||||
# because it leads to a lot of false-positives.
|
||||
#
|
||||
# https://en.wikipedia.org/wiki/Xcode#Latest_versions
|
||||
if (APPLE)
|
||||
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-undefined-var-template")
|
||||
endif()
|
||||
add_definitions(-DGL_SILENCE_DEPRECATION)
|
||||
elseif (UNIX)
|
||||
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.9)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-undefined-var-template")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# older boost.preprocessor turn off variadics for clang
|
||||
add_definitions(-DBOOST_PP_VARIADICS=1)
|
||||
message(STATUS "Force BOOST_PP_VARIADICS=1 for clang")
|
||||
endif()
|
||||
|
||||
set (COMPILE_DEFINITIONS ${COMPILE_DEFINITIONS} BOOST_NO_CXX98_FUNCTION_BASE)
|
||||
|
||||
endmacro(CompilerChecksAndSetups)
|
||||
@@ -1,37 +0,0 @@
|
||||
macro(ConfigureCMakeVariables)
|
||||
# ================================================================================
|
||||
# Output directories for install target
|
||||
|
||||
if(WIN32)
|
||||
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "Installation root directory")
|
||||
set(CMAKE_INSTALL_BINDIR bin CACHE PATH "Output directory for executables")
|
||||
set(CMAKE_INSTALL_DATADIR data CACHE PATH "Output directory for data and resource files")
|
||||
set(CMAKE_INSTALL_INCLUDEDIR include CACHE PATH "Output directory for header files")
|
||||
set(CMAKE_INSTALL_DOCDIR doc CACHE PATH "Output directory for documentation and license files")
|
||||
# Don't set it without manual adoption of LibDir variable in src/App/FreeCADInit.py
|
||||
set(CMAKE_INSTALL_LIBDIR lib CACHE PATH "Output directory for libraries")
|
||||
else()
|
||||
set(CMAKE_INSTALL_PREFIX "/usr/lib${LIB_SUFFIX}/freecad" CACHE PATH "Installation root directory")
|
||||
include(GNUInstallDirs)
|
||||
endif()
|
||||
|
||||
set(PYCXX_INCLUDE_DIR
|
||||
"${CMAKE_SOURCE_DIR}/src" CACHE PATH
|
||||
"Path to the directory containing PyCXX's CXX/Config.hxx include file")
|
||||
set(PYCXX_SOURCE_DIR
|
||||
"${CMAKE_SOURCE_DIR}/src/CXX" CACHE PATH
|
||||
"Path to the directory containing PyCXX's cxxextensions.c source file")
|
||||
|
||||
# used as compiler defines
|
||||
set(RESOURCEDIR "${CMAKE_INSTALL_DATADIR}")
|
||||
set(LIBRARYDIR "${CMAKE_INSTALL_LIBDIR}")
|
||||
set(DOCDIR "${CMAKE_INSTALL_DOCDIR}")
|
||||
|
||||
message(STATUS "prefix: ${CMAKE_INSTALL_PREFIX}")
|
||||
message(STATUS "bindir: ${CMAKE_INSTALL_BINDIR}")
|
||||
message(STATUS "datadir: ${CMAKE_INSTALL_DATADIR}")
|
||||
message(STATUS "docdir: ${CMAKE_INSTALL_DOCDIR}")
|
||||
message(STATUS "includedir: ${CMAKE_INSTALL_INCLUDEDIR}")
|
||||
message(STATUS "libdir: ${CMAKE_INSTALL_LIBDIR}")
|
||||
message(STATUS "cmake: ${CMAKE_VERSION}")
|
||||
endmacro(ConfigureCMakeVariables)
|
||||
@@ -1,56 +0,0 @@
|
||||
macro(CopyLibpackDirectories)
|
||||
# Copy libpack dependency directories to build folder for user as part of overall build process
|
||||
if(FREECAD_COPY_DEPEND_DIRS_TO_BUILD)
|
||||
message(STATUS "=======================================\n"
|
||||
"Copying libpack dependency directories to build directory for Windows MSVC build.\n")
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin/assistant.exe DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin/QtWebEngineProcess.exe DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin/QtWebEngineProcessd.exe DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin/qt.conf DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/platforms DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/imageformats DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/iconengines DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/sqldrivers DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/styles DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/printsupport DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/resources DESTINATION ${CMAKE_BINARY_DIR})
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/translations/qtwebengine_locales DESTINATION ${CMAKE_BINARY_DIR}/translations)
|
||||
message(STATUS "... end copying.\n=======================================\n")
|
||||
endif()
|
||||
|
||||
if(COPY_LIBPACK_BIN_TO_BUILD)
|
||||
if(FREECAD_COPY_LIBPACK_BIN_TO_BUILD)
|
||||
message("=======================================\n"
|
||||
"Copying libpack 'bin' directory to build directory.\n")
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin DESTINATION ${CMAKE_BINARY_DIR})
|
||||
message("... done copying libpack 'bin' directory.\n=======================================\n")
|
||||
endif()
|
||||
if(FREECAD_COPY_PLUGINS_BIN_TO_BUILD)
|
||||
message(STATUS "=======================================\n"
|
||||
"Copying plugins to build directory.")
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/imageformats DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/platforms DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/styles DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin/QtWebEngineProcess.exe DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin/QtWebEngineProcessd.exe DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/translations/qtwebengine_locales DESTINATION ${CMAKE_BINARY_DIR}/translations)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/resources DESTINATION ${CMAKE_BINARY_DIR})
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/bin/qt.conf "[Paths]\nPrefix=..\n")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(FREECAD_INSTALL_DEPEND_DIRS)
|
||||
# Test install command for installing/copying directories
|
||||
message(STATUS "=======================================")
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/platforms DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/imageformats DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/iconengines DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/sqldrivers DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/styles DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/printsupport DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/translations/qtwebengine_locales DESTINATION ${CMAKE_INSTALL_PREFIX}/translations)
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/resources DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/bin DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
message(STATUS "Created install commands for INSTALL target.\n")
|
||||
endif()
|
||||
endmacro()
|
||||
@@ -1,41 +0,0 @@
|
||||
macro(CreatePackagingTargets)
|
||||
# ================================================================================
|
||||
# == Packaging ===================================================================
|
||||
#
|
||||
#add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
|
||||
add_custom_target(dist-git
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py
|
||||
--bindir=${CMAKE_BINARY_DIR}
|
||||
--major=${PACKAGE_VERSION_MAJOR}
|
||||
--minor=${PACKAGE_VERSION_MINOR}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
add_custom_target(distdfsg-git
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py
|
||||
--bindir=${CMAKE_BINARY_DIR}
|
||||
--major=${PACKAGE_VERSION_MAJOR}
|
||||
--minor=${PACKAGE_VERSION_MINOR}
|
||||
--dfsg
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX OR MINGW)
|
||||
add_custom_target(distcheck-git
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py
|
||||
--bindir=${CMAKE_BINARY_DIR}
|
||||
--major=${PACKAGE_VERSION_MAJOR}
|
||||
--minor=${PACKAGE_VERSION_MINOR}
|
||||
--check
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
add_custom_target(distcheckdfsg-git
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py
|
||||
--bindir=${CMAKE_BINARY_DIR}
|
||||
--major=${PACKAGE_VERSION_MAJOR}
|
||||
--minor=${PACKAGE_VERSION_MINOR}
|
||||
--dfsg
|
||||
--check
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
endmacro(CreatePackagingTargets)
|
||||
@@ -1,41 +0,0 @@
|
||||
macro(FreeCADLibpackChecks)
|
||||
# ==============================================================================
|
||||
|
||||
if(FREECAD_LIBPACK_USE)
|
||||
|
||||
# checking for a unique file in LibPack location to make sure the right version of the LibPack is there
|
||||
find_file(FREECAD_LIBPACK_CHECKFILE_CLBUNDLER MANIFEST.db ${FREECAD_LIBPACK_DIR})
|
||||
|
||||
# don't show them in the GUI
|
||||
set(FREECAD_LIBPACK_CHECKFILE_CLBUNDLER "${FREECAD_LIBPACK_CHECKFILE_CLBUNDLER}" CACHE INTERNAL "Find libpack")
|
||||
|
||||
if (FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
|
||||
set(FREECAD_LIBPACK_VERSION "CLbundler" CACHE STRING "Displays if the libpack has been found" FORCE)
|
||||
include(cMake/UseLibPackCLbundler.cmake)
|
||||
else(FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
|
||||
set(FREECAD_LIBPACK_VERSION "NOTFOUND" CACHE STRING "Displays if the libpack has been found" FORCE)
|
||||
message(SEND_ERROR "Could not find libpack in specified location:" ${FREECAD_LIBPACK_DIR})
|
||||
endif(FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
|
||||
# -------------------------------- PyCXX --------------------------------
|
||||
|
||||
find_package(PyCXX REQUIRED)
|
||||
|
||||
# -------------------------------- Swig ----------------------------------
|
||||
|
||||
find_package(SWIG)
|
||||
|
||||
if(NOT SWIG_FOUND)
|
||||
message("==================================================\n"
|
||||
"SWIG not found, don't build SWIG binding for pivy.\n"
|
||||
"==================================================\n")
|
||||
endif(NOT SWIG_FOUND)
|
||||
|
||||
# -------------------------------- Salome SMESH --------------------------
|
||||
|
||||
if(NOT FREECAD_USE_EXTERNAL_SMESH)
|
||||
set(SMESH_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/3rdParty/salomesmesh/inc)
|
||||
endif()
|
||||
|
||||
endif(FREECAD_LIBPACK_USE)
|
||||
|
||||
endmacro(FreeCADLibpackChecks)
|
||||
@@ -1,181 +0,0 @@
|
||||
macro(InitializeFreeCADBuildOptions)
|
||||
# ==============================================================================
|
||||
# ================= All the options for the build process =================
|
||||
# ==============================================================================
|
||||
|
||||
option(BUILD_FORCE_DIRECTORY "The build directory must be different to the source directory." OFF)
|
||||
option(BUILD_GUI "Build FreeCAD Gui. Otherwise you have only the command line and the Python import module." ON)
|
||||
option(FREECAD_USE_EXTERNAL_ZIPIOS "Use system installed zipios++ instead of the bundled." OFF)
|
||||
option(FREECAD_USE_EXTERNAL_SMESH "Use system installed smesh instead of the bundled." OFF)
|
||||
option(FREECAD_USE_EXTERNAL_KDL "Use system installed orocos-kdl instead of the bundled." OFF)
|
||||
option(FREECAD_USE_EXTERNAL_FMT "Use system installed fmt library if available instead of fetching the source." ON)
|
||||
option(FREECAD_USE_FREETYPE "Builds the features using FreeType libs" ON)
|
||||
option(FREECAD_BUILD_DEBIAN "Prepare for a build of a Debian package" OFF)
|
||||
option(BUILD_WITH_CONDA "Set ON if you build FreeCAD with conda" OFF)
|
||||
option(BUILD_DYNAMIC_LINK_PYTHON "If OFF extension-modules do not link against python-libraries" ON)
|
||||
option(INSTALL_TO_SITEPACKAGES "If ON the freecad root namespace (python) is installed into python's site-packages" OFF)
|
||||
option(OCCT_CMAKE_FALLBACK "disable usage of occt-config files" OFF)
|
||||
if (WIN32 OR APPLE)
|
||||
option(FREECAD_USE_QT_FILEDIALOG "Use Qt's file dialog instead of the native one." OFF)
|
||||
else()
|
||||
option(FREECAD_USE_QT_FILEDIALOG "Use Qt's file dialog instead of the native one." ON)
|
||||
endif()
|
||||
|
||||
# == Win32 is default behaviour use the LibPack copied in Source tree ==========
|
||||
if(MSVC)
|
||||
option(FREECAD_RELEASE_PDB "Create PDB files for Release version." ON)
|
||||
option(FREECAD_RELEASE_SEH "Enable Structured Exception Handling for Release version." ON)
|
||||
option(FREECAD_LIBPACK_USE "Use the LibPack to Build FreeCAD (only Win32 so far)." ON)
|
||||
option(FREECAD_USE_PCH "Activate precompiled headers where it's used." ON)
|
||||
|
||||
if (DEFINED ENV{FREECAD_LIBPACK_DIR})
|
||||
set(FREECAD_LIBPACK_DIR $ENV{FREECAD_LIBPACK_DIR} CACHE PATH "Directory of the FreeCAD LibPack")
|
||||
message(STATUS "Found libpack env variable: ${FREECAD_LIBPACK_DIR}")
|
||||
else()
|
||||
set(FREECAD_LIBPACK_DIR ${CMAKE_SOURCE_DIR} CACHE PATH "Directory of the FreeCAD LibPack")
|
||||
endif()
|
||||
|
||||
set(LIBPACK_FOUND OFF )
|
||||
if (EXISTS ${FREECAD_LIBPACK_DIR}/plugins/imageformats/qsvg.dll)
|
||||
set(LIBPACK_FOUND ON )
|
||||
set(COPY_LIBPACK_BIN_TO_BUILD OFF )
|
||||
# Create install commands for dependencies for INSTALL target in FreeCAD solution
|
||||
option(FREECAD_INSTALL_DEPEND_DIRS "Create install dependency commands for the INSTALL target found
|
||||
in the FreeCAD solution." ON)
|
||||
# Copy libpack smaller dependency folders to build folder per user request - if non-existent at destination
|
||||
if (NOT EXISTS ${CMAKE_BINARY_DIR}/bin/imageformats/qsvg.dll)
|
||||
option(FREECAD_COPY_DEPEND_DIRS_TO_BUILD "Copy smaller libpack dependency directories to build directory." OFF)
|
||||
endif()
|
||||
# Copy libpack 'bin' directory contents to build 'bin' per user request - only IF NOT EXISTS already
|
||||
if (NOT EXISTS ${CMAKE_BINARY_DIR}/bin/DLLs)
|
||||
set(COPY_LIBPACK_BIN_TO_BUILD ON )
|
||||
option(FREECAD_COPY_LIBPACK_BIN_TO_BUILD "Copy larger libpack dependency 'bin' folder to the build directory." OFF)
|
||||
# Copy only the minimum number of files to get a working application
|
||||
option(FREECAD_COPY_PLUGINS_BIN_TO_BUILD "Copy plugins to the build directory." OFF)
|
||||
endif()
|
||||
else()
|
||||
message("Libpack NOT found.\nIf you intend to use a Windows libpack, set the FREECAD_LIBPACK_DIR to the libpack directory.")
|
||||
message(STATUS "Visit: https://github.com/FreeCAD/FreeCAD-Libpack/releases/ for Windows libpack downloads.")
|
||||
endif()
|
||||
else(MSVC)
|
||||
option(FREECAD_LIBPACK_USE "Use the LibPack to Build FreeCAD (only Win32 so far)." OFF)
|
||||
set(FREECAD_LIBPACK_DIR "" CACHE PATH "Directory of the FreeCAD LibPack")
|
||||
endif(MSVC)
|
||||
|
||||
ChooseQtVersion()
|
||||
|
||||
# https://blog.kitware.com/constraining-values-with-comboboxes-in-cmake-cmake-gui/
|
||||
set(FREECAD_USE_OCC_VARIANT "Community Edition" CACHE STRING "Official OpenCASCADE version or community edition")
|
||||
set_property(CACHE FREECAD_USE_OCC_VARIANT PROPERTY STRINGS
|
||||
"Official Version"
|
||||
"Community Edition"
|
||||
)
|
||||
|
||||
configure_file(${CMAKE_SOURCE_DIR}/src/QtOpenGL.h.cmake ${CMAKE_BINARY_DIR}/src/QtOpenGL.h)
|
||||
|
||||
option(BUILD_DESIGNER_PLUGIN "Build and install the designer plugin" OFF)
|
||||
|
||||
if(APPLE)
|
||||
option(FREECAD_CREATE_MAC_APP "Create app bundle on install" OFF)
|
||||
|
||||
if(FREECAD_CREATE_MAC_APP)
|
||||
install(
|
||||
DIRECTORY ${CMAKE_SOURCE_DIR}/src/MacAppBundle/FreeCAD.app/
|
||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}.app
|
||||
)
|
||||
|
||||
# It should be safe to assume we've got sed on OSX...
|
||||
install(CODE "
|
||||
execute_process(COMMAND
|
||||
sed -i \"\" -e s/VERSION_STRING_FROM_CMAKE/${PACKAGE_VERSION}/
|
||||
-e s/NAME_STRING_FROM_CMAKE/${PROJECT_NAME}/
|
||||
${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}.app/Contents/Info.plist)
|
||||
")
|
||||
|
||||
set(CMAKE_INSTALL_PREFIX
|
||||
${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}.app/Contents)
|
||||
set(CMAKE_INSTALL_LIBDIR ${CMAKE_INSTALL_PREFIX}/lib )
|
||||
endif(FREECAD_CREATE_MAC_APP)
|
||||
set(CMAKE_MACOSX_RPATH TRUE )
|
||||
endif(APPLE)
|
||||
|
||||
option(BUILD_FEM "Build the FreeCAD FEM module" ON)
|
||||
option(BUILD_SANDBOX "Build the FreeCAD Sandbox module which is only for testing purposes" OFF)
|
||||
option(BUILD_TEMPLATE "Build the FreeCAD template module which is only for testing purposes" OFF)
|
||||
option(BUILD_ADDONMGR "Build the FreeCAD addon manager module" ON)
|
||||
option(BUILD_ARCH "Build the FreeCAD Architecture module" ON)
|
||||
option(BUILD_DRAFT "Build the FreeCAD draft module" ON)
|
||||
option(BUILD_DRAWING "Build the FreeCAD drawing module" OFF)
|
||||
option(BUILD_IDF "Build the FreeCAD idf module" ON)
|
||||
option(BUILD_IMPORT "Build the FreeCAD import module" ON)
|
||||
option(BUILD_INSPECTION "Build the FreeCAD inspection module" ON)
|
||||
option(BUILD_JTREADER "Build the FreeCAD jt reader module" OFF)
|
||||
option(BUILD_MATERIAL "Build the FreeCAD material module" ON)
|
||||
option(BUILD_MESH "Build the FreeCAD mesh module" ON)
|
||||
option(BUILD_MESH_PART "Build the FreeCAD mesh part module" ON)
|
||||
option(BUILD_FLAT_MESH "Build the FreeCAD flat mesh module" ON)
|
||||
option(BUILD_OPENSCAD "Build the FreeCAD openscad module" ON)
|
||||
option(BUILD_PART "Build the FreeCAD part module" ON)
|
||||
option(BUILD_PART_DESIGN "Build the FreeCAD part design module" ON)
|
||||
option(BUILD_PATH "Build the FreeCAD path module" ON)
|
||||
option(BUILD_PLOT "Build the FreeCAD plot module" ON)
|
||||
option(BUILD_POINTS "Build the FreeCAD points module" ON)
|
||||
option(BUILD_REVERSEENGINEERING "Build the FreeCAD reverse engineering module" ON)
|
||||
option(BUILD_ROBOT "Build the FreeCAD robot module" ON)
|
||||
option(BUILD_SHOW "Build the FreeCAD Show module (helper module for visibility automation)" ON)
|
||||
option(BUILD_SKETCHER "Build the FreeCAD sketcher module" ON)
|
||||
option(BUILD_SPREADSHEET "Build the FreeCAD spreadsheet module" ON)
|
||||
option(BUILD_START "Build the FreeCAD start module" ON)
|
||||
option(BUILD_TEST "Build the FreeCAD test module" ON)
|
||||
option(BUILD_TECHDRAW "Build the FreeCAD Technical Drawing module" ON)
|
||||
option(BUILD_TUX "Build the FreeCAD Tux module" ON)
|
||||
option(BUILD_WEB "Build the FreeCAD web module" ON)
|
||||
option(BUILD_SURFACE "Build the FreeCAD surface module" ON)
|
||||
option(BUILD_VR "Build the FreeCAD Oculus Rift support (need Oculus SDK 4.x or higher)" OFF)
|
||||
option(BUILD_CLOUD "Build the FreeCAD cloud module" OFF)
|
||||
option(ENABLE_DEVELOPER_TESTS "Build the FreeCAD unit tests suit" ON)
|
||||
|
||||
if(MSVC)
|
||||
option(BUILD_FEM_NETGEN "Build the FreeCAD FEM module with the NETGEN mesher" ON)
|
||||
option(FREECAD_USE_PCL "Build the features that use PCL libs" OFF) # 3/5/2021 current LibPack uses non-C++17 FLANN
|
||||
option(FREECAD_USE_3DCONNEXION "Use the 3D connexion SDK to support 3d mouse." ON)
|
||||
elseif(APPLE)
|
||||
find_library(3DCONNEXIONCLIENT_FRAMEWORK 3DconnexionClient)
|
||||
if(IS_DIRECTORY ${3DCONNEXIONCLIENT_FRAMEWORK})
|
||||
option(FREECAD_USE_3DCONNEXION "Use the 3D connexion SDK to support 3d mouse." ON)
|
||||
else(IS_DIRECTORY ${3DCONNEXIONCLIENT_FRAMEWORK})
|
||||
option(FREECAD_USE_3DCONNEXION "Use the 3D connexion SDK to support 3d mouse." OFF)
|
||||
endif(IS_DIRECTORY ${3DCONNEXIONCLIENT_FRAMEWORK})
|
||||
else(MSVC)
|
||||
set(FREECAD_USE_3DCONNEXION OFF )
|
||||
endif(MSVC)
|
||||
if(NOT MSVC)
|
||||
option(BUILD_FEM_NETGEN "Build the FreeCAD FEM module with the NETGEN mesher" OFF)
|
||||
option(FREECAD_USE_PCL "Build the features that use PCL libs" OFF)
|
||||
endif(NOT MSVC)
|
||||
|
||||
# if this is set override some options
|
||||
if (FREECAD_BUILD_DEBIAN)
|
||||
set(FREECAD_USE_EXTERNAL_ZIPIOS ON )
|
||||
# A Debian package for SMESH doesn't exist
|
||||
#set(FREECAD_USE_EXTERNAL_SMESH ON )
|
||||
endif (FREECAD_BUILD_DEBIAN)
|
||||
|
||||
if(BUILD_FEM)
|
||||
set(BUILD_SMESH ON )
|
||||
endif()
|
||||
|
||||
# for Windows the minimum required cmake version is 3.4.3 to build the Path module
|
||||
if(WIN32 AND CMAKE_VERSION VERSION_LESS 3.4.3)
|
||||
message(WARNING "Disable Path, requires cmake >= 3.4.3 in order to build this module")
|
||||
set(BUILD_PATH OFF )
|
||||
endif()
|
||||
|
||||
# force build directory to be different to source directory
|
||||
if (BUILD_FORCE_DIRECTORY)
|
||||
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
||||
message(FATAL_ERROR "The build directory (${CMAKE_BINARY_DIR}) must be different to the source directory (${CMAKE_SOURCE_DIR}).\n"
|
||||
"Please choose another build directory! Or disable the option BUILD_FORCE_DIRECTORY.")
|
||||
endif()
|
||||
endif()
|
||||
endmacro(InitializeFreeCADBuildOptions)
|
||||
@@ -1,185 +0,0 @@
|
||||
macro(PrintFinalReport)
|
||||
|
||||
# name and value
|
||||
macro(simple)
|
||||
set(name ${ARGV0})
|
||||
set(value ${ARGV1})
|
||||
if(NOT value)
|
||||
set(value "-undefined-")
|
||||
endif()
|
||||
string(APPEND name ": ")
|
||||
string(SUBSTRING ${name} 0 28 nameStr)
|
||||
list(APPEND simpleLines "${nameStr} ${value}")
|
||||
endmacro()
|
||||
|
||||
# just a value
|
||||
macro(value)
|
||||
unset(val)
|
||||
set(name ${ARGV0})
|
||||
if(${name})
|
||||
set(val ${${name}}) # name has a value
|
||||
elseif(DEFINED ${name})
|
||||
set(val "OFF ") #!
|
||||
endif()
|
||||
simple(${name} ${val})
|
||||
endmacro()
|
||||
|
||||
# conditional data
|
||||
macro(conditional)
|
||||
set(name ${ARGV0})
|
||||
set(condition ${ARGV1})
|
||||
set(ifFalse ${ARGV2})
|
||||
set(ifTrue ${ARGV3})
|
||||
if(${condition})
|
||||
set(out ${ifTrue})
|
||||
else()
|
||||
set(out ${ifFalse})
|
||||
endif()
|
||||
simple(${name} ${out})
|
||||
endmacro()
|
||||
|
||||
function(section_begin name)
|
||||
unset(simpleLines PARENT_SCOPE)
|
||||
message("\n ==============\n"
|
||||
" ${name}\n"
|
||||
" ==============\n")
|
||||
endfunction()
|
||||
|
||||
function(section_end)
|
||||
list(SORT simpleLines CASE INSENSITIVE)
|
||||
foreach(line ${simpleLines})
|
||||
message(STATUS ${line})
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
############## System ####################
|
||||
|
||||
section_begin(System)
|
||||
|
||||
simple(Compiler "${CMAKE_CXX_COMPILER} (${CMAKE_CXX_COMPILER_VERSION})")
|
||||
value(CMAKE_VERSION)
|
||||
simple(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
simple(bindir ${CMAKE_INSTALL_BINDIR})
|
||||
simple(datadir ${CMAKE_INSTALL_DATADIR})
|
||||
simple(docdir ${CMAKE_INSTALL_DOCDIR})
|
||||
simple(includedir ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
simple(libdir ${CMAKE_INSTALL_LIBDIR})
|
||||
simple(Python "${Python3_VERSION} [${PYTHON_EXECUTABLE}] Suffix: [${PYTHON_CONFIG_SUFFIX}]")
|
||||
value(BLAS)
|
||||
|
||||
section_end()
|
||||
|
||||
############## Config ####################
|
||||
|
||||
section_begin(Config)
|
||||
|
||||
value(CMAKE_CXX_STANDARD)
|
||||
value(CMAKE_CXX_FLAGS)
|
||||
value(CMAKE_BUILD_TYPE)
|
||||
value(ENABLE_DEVELOPER_TESTS)
|
||||
value(FREECAD_USE_FREETYPE)
|
||||
value(FREECAD_USE_EXTERNAL_SMESH)
|
||||
value(BUILD_SMESH)
|
||||
value(BUILD_VR)
|
||||
value(CMAKE_PREFIX_PATH)
|
||||
value(FREECAD_QT_VERSION)
|
||||
value(PYTHON_EXECUTABLE)
|
||||
value(PYTHON_LIBRARY)
|
||||
value(FREECAD_CREATE_MAC_APP)
|
||||
value(FREECAD_USE_PYBIND11)
|
||||
value(FREECAD_USE_EXTERNAL_KDL)
|
||||
value(BUILD_FEM)
|
||||
value(BUILD_WEB)
|
||||
value(BUILD_GUI)
|
||||
value(BUILD_START)
|
||||
value(BUILD_TECHDRAW)
|
||||
value(CMAKE_INSTALL_PREFIX)
|
||||
value(USE_CUDA)
|
||||
value(USE_OPENCV)
|
||||
value(FREECAD_LIBPACK_USE)
|
||||
|
||||
section_end()
|
||||
|
||||
################ Libraries ##################
|
||||
|
||||
section_begin(Libraries)
|
||||
|
||||
# Qt5 needs/sets PYTHON_CONFIG_SUFFIX regarding Shiboken
|
||||
conditional(pybind11 pybind11_FOUND "not enabled" ${pybind11_VERSION})
|
||||
simple(Boost ${Boost_VERSION})
|
||||
simple(XercesC "${XercesC_VERSION} [${XercesC_LIBRARIES}] [${XercesC_INCLUDE_DIRS}]")
|
||||
simple(ZLIB "${ZLIB_VERSION_STRING}")
|
||||
simple(OCC "${OCC_VERSION_STRING} [${OCC_LIBRARY_DIR}] [${OCC_INCLUDE_DIR}]")
|
||||
simple(OCC_Libs "[${OCC_LIBRARIES}]")
|
||||
if(BUILD_SMESH)
|
||||
if(FREECAD_USE_EXTERNAL_SMESH)
|
||||
simple(SMESH "${SMESH_VERSION_MAJOR}.${SMESH_VERSION_MINOR}.${SMESH_VERSION_PATCH}.${SMESH_VERSION_TWEAK}")
|
||||
else()
|
||||
simple(SMESH "${SMESH_VERSION_MAJOR}.${SMESH_VERSION_MINOR}.${SMESH_VERSION_PATCH}.${SMESH_VERSION_TWEAK} build internal")
|
||||
simple(MEDFile "${MEDFILE_VERSION} [${MEDFILE_LIBRARIES}] [${MEDFILE_INCLUDE_DIRS}]")
|
||||
simple(HDF5 ${HDF5_VERSION})
|
||||
simple(VTK ${VTK_VERSION})
|
||||
endif()
|
||||
else()
|
||||
simple(SMESH "do not build")
|
||||
endif()
|
||||
conditional(NETGEN NETGEN_FOUND
|
||||
"not enabled"
|
||||
"${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}.${NETGEN_VERSION_PATCH} (${NETGEN_VERSION}) [${NETGEN_DEFINITIONS}] [${NETGEN_CXX_FLAGS}] [${NGLIB_INCLUDE_DIR}] [${NGLIB_LIBRARIES}] [${NETGEN_INCLUDE_DIRS}]"
|
||||
)
|
||||
#simple(OpenCV ${OpenCV_VERSION})
|
||||
conditional(SWIG SWIG_FOUND "not found" ${SWIG_VERSION})
|
||||
conditional(Eigen3 EIGEN3_FOUND "not found" ${EIGEN3_VERSION})
|
||||
conditional(QtConcurrent BUILD_GUI "not needed" ${QtConcurrent_VERSION})
|
||||
simple(QtCore ${QtCore_VERSION})
|
||||
simple(QtNetwork ${QtNetwork_VERSION})
|
||||
conditional(QtOpenGL BUILD_GUI "not needed" ${QtOpenGL_VERSION})
|
||||
conditional(QtPrintSupport BUILD_GUI "not needed" ${QtPrintSupport_VERSION})
|
||||
conditional(QtSvg BUILD_GUI "not needed" ${QtSvg_VERSION})
|
||||
conditional(QtUiTools BUILD_GUI "not needed" ${QtUiTools_VERSION})
|
||||
conditional(QtWidgets BUILD_GUI "not needed" ${QtWidgets_VERSION})
|
||||
simple(QtXml ${QtXml_VERSION})
|
||||
if (BUILD_GUI)
|
||||
conditional(QtWebEngineWidgets BUILD_WEB "not needed (BUILD_WEB is OFF)" ${QtWebEngineWidgets_VERSION})
|
||||
conditional(DesignerPlugin BUILD_DESIGNER_PLUGIN
|
||||
"not built (BUILD_DESIGNER_PLUGIN is OFF)"
|
||||
"[${DESIGNER_PLUGIN_LOCATION}/${libFreeCAD_widgets}]"
|
||||
)
|
||||
else()
|
||||
simple(QtWebKitWidgets "not needed")
|
||||
endif()
|
||||
conditional(Shiboken Shiboken${SHIBOKEN_MAJOR_VERSION}_FOUND "not found" "${Shiboken_VERSION} [${SHIBOKEN_INCLUDE_DIR}]")
|
||||
conditional(PySide PySide${PYSIDE_MAJOR_VERSION}_FOUND "not found" "${PySide_VERSION} [${PYSIDE_INCLUDE_DIR}]")
|
||||
conditional(PySideTools PYSIDE_TOOLS_FOUND
|
||||
"not found"
|
||||
"v: ${PySideTools_VERSION} uic: [${PYSIDE_UIC_EXECUTABLE}] rcc: [${PYSIDE_RCC_EXECUTABLE}]"
|
||||
)
|
||||
if(FREECAD_USE_FREETYPE)
|
||||
conditional(Freetype FREETYPE_FOUND "not found" ${FREETYPE_VERSION_STRING})
|
||||
else()
|
||||
simple(Freetype "disabled")
|
||||
endif()
|
||||
simple(OpenGL_Lib [${OPENGL_gl_LIBRARY}])
|
||||
simple(OpenGLU_Lib [${OPENGL_glu_LIBRARY}])
|
||||
simple(OpenGLU_Incl [${OPENGL_INCLUDE_DIR}])
|
||||
simple(Coin3D "${COIN3D_VERSION} [${COIN3D_LIBRARIES}] [${COIN3D_INCLUDE_DIRS}]")
|
||||
simple(pivy ${PIVY_VERSION})
|
||||
if (WIN32)
|
||||
#simple(SPNAV "not available yet for your OS") # FREECAD_USE_3DCONNEXION instead...
|
||||
else()
|
||||
conditional(SPNAV SPNAV_FOUND "not found" "[${SPNAV_LIBRARY}] [${SPNAV_INCLUDE_DIR}]")
|
||||
endif()
|
||||
conditional(Matplotlib MATPLOTLIB_FOUND "not found" "${MATPLOTLIB_VERSION} PathDirs: ${MATPLOTLIB_PATH_DIRS}")
|
||||
if(BUILD_VR)
|
||||
conditional(Rift RIFT_FOUND "not found" ${Rift_VERSION})
|
||||
else()
|
||||
simple(Rift "not enabled (BUILD_VR)")
|
||||
endif()
|
||||
conditional(Doxygen DOXYGEN_FOUND "not found" "${DOXYGEN_VERSION} Language: ${DOXYGEN_LANGUAGE}")
|
||||
conditional(Coin3D_DOC COIN3D_DOC_FOUND "not found" ${COIN3D_DOC_PATH})
|
||||
conditional(PYCXX PYCXX_FOUND "not found" "${PYCXX_VERSION} Incl: ${PYCXX_INCLUDE_DIR} Src:${PYCXX_SOURCE_DIR}")
|
||||
conditional(fmt fmt_FOUND "Sources downloaded to ${fmt_SOURCE_DIR}" "${fmt_VERSION}")
|
||||
|
||||
section_end()
|
||||
|
||||
endmacro()
|
||||
@@ -1,19 +0,0 @@
|
||||
This folder will contain an individual cmake file for each FreeCAD "helper".
|
||||
|
||||
A "helper" should be a macro or function that tries (as much as possible) to adhere to the
|
||||
UNIX philosophy - in other words, it should strive to do one thing and do it well.
|
||||
|
||||
The idea here is to break up the cmake build system into smaller, more manageable chunks.
|
||||
This should make maintenance easier, and should also make troubleshooting a bit less
|
||||
painful. Finally, it should also clean up our top-level CMakeLists.txt file a bit, making
|
||||
it bit easier for new developers to jump in and see what's what.
|
||||
|
||||
NOTE: CMake has a very distinct difference between its macros and its functions. Namely, a
|
||||
function creates its own SCOPE, whereas a macro essentially executes in the calling scope.
|
||||
There are also some specifics of how arguments are managed.
|
||||
|
||||
In general:
|
||||
|
||||
1) If you use a macro, be careful modifying arguments - you may get surprises.
|
||||
2) If you use a function, make sure to use set(.... PARENT_SCOPE) for variables that
|
||||
should be available outside of the function.
|
||||
@@ -1,86 +0,0 @@
|
||||
macro(SetGlobalCompilerAndLinkerSettings)
|
||||
# ================================================================================
|
||||
# == Global Compiler and Linker Settings =========================================
|
||||
|
||||
include_directories(${CMAKE_BINARY_DIR}/src
|
||||
${CMAKE_SOURCE_DIR}/src)
|
||||
|
||||
# check for 64-bit platform
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
message(STATUS "Platform is 64-bit, set -D_OCC64")
|
||||
add_definitions(-D_OCC64 )
|
||||
else(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
message(STATUS "Platform is 32-bit")
|
||||
endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
|
||||
# check for mips64 platform
|
||||
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "mips64")
|
||||
message(STATUS "Architecture: mips64")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mxgot")
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
# set default compiler settings
|
||||
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zm150 /bigobj")
|
||||
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DFC_DEBUG /Zm150 /bigobj")
|
||||
# set default libs
|
||||
set (CMAKE_C_STANDARD_LIBRARIES "kernel32.lib user32.lib gdi32.lib winspool.lib SHFolder.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib winmm.lib comsupp.lib Ws2_32.lib dbghelp.lib ")
|
||||
set (CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES}")
|
||||
# set linker flag /nodefaultlib
|
||||
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB")
|
||||
set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /NODEFAULTLIB")
|
||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB")
|
||||
if(FREECAD_RELEASE_PDB)
|
||||
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
|
||||
set (CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG")
|
||||
endif(FREECAD_RELEASE_PDB)
|
||||
if(FREECAD_RELEASE_SEH)
|
||||
# remove /EHsc or /EHs flags because they are incompatible with /EHa
|
||||
if (${CMAKE_BUILD_TYPE} MATCHES "Release")
|
||||
string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||
string(REPLACE "/EHs" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /EHa")
|
||||
endif()
|
||||
endif(FREECAD_RELEASE_SEH)
|
||||
|
||||
option(FREECAD_USE_MP_COMPILE_FLAG "Add /MP flag to the compiler definitions. Speeds up the compile on multi processor machines" ON)
|
||||
if(FREECAD_USE_MP_COMPILE_FLAG)
|
||||
# set "Build with Multiple Processes"
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")
|
||||
endif()
|
||||
|
||||
# Mark 32 bit executables large address aware so they can use > 2GB address space
|
||||
# NOTE: This setting only has an effect on machines with at least 3GB of RAM, although it sets the linker option it doesn't set the linker switch 'Enable Large Addresses'
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /LARGEADDRESSAWARE")
|
||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
|
||||
endif(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
else(MSVC)
|
||||
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DFC_DEBUG")
|
||||
#message(STATUS "DEBUG: ${CMAKE_CXX_FLAGS_DEBUG}")
|
||||
endif(MSVC)
|
||||
|
||||
if(MINGW)
|
||||
if(CMAKE_COMPILER_IS_CLANGXX)
|
||||
# clang for MSYS doesn't support -mthreads
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-attributes")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--export-all-symbols")
|
||||
#set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--export-all-symbols")
|
||||
else()
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12477
|
||||
# Actually '-Wno-inline-dllimport' should work to suppress warnings of the form:
|
||||
# inline function 'foo' is declared as dllimport: attribute ignored
|
||||
# But it doesn't work with MinGW gcc 4.5.0 while using '-Wno-attributes' seems to
|
||||
# do the trick.
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-attributes")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--export-all-symbols")
|
||||
#set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--export-all-symbols")
|
||||
# http://stackoverflow.com/questions/8375310/warning-auto-importing-has-been-activated-without-enable-auto-import-specifie
|
||||
# set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libgcc -static-libstdc++")
|
||||
link_libraries(-lgdi32)
|
||||
endif()
|
||||
endif(MINGW)
|
||||
endmacro(SetGlobalCompilerAndLinkerSettings)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user