Commit Graph

45 Commits

Author SHA1 Message Date
Campbell Barton 2b508f7ae3 Cleanup: cmake indentation 2023-11-04 16:41:18 +11:00
Campbell Barton e955c94ed3 License Headers: Set copyright to "Blender Authors", add AUTHORS
Listing the "Blender Foundation" as copyright holder implied the Blender
Foundation holds copyright to files which may include work from many
developers.

While keeping copyright on headers makes sense for isolated libraries,
Blender's own code may be refactored or moved between files in a way
that makes the per file copyright holders less meaningful.

Copyright references to the "Blender Foundation" have been replaced with
"Blender Authors", with the exception of `./extern/` since these this
contains libraries which are more isolated, any changed to license
headers there can be handled on a case-by-case basis.

Some directories in `./intern/` have also been excluded:

- `./intern/cycles/` it's own `AUTHORS` file is planned.
- `./intern/opensubdiv/`.

An "AUTHORS" file has been added, using the chromium projects authors
file as a template.

Design task: #110784

Ref !110783.
2023-08-16 00:20:26 +10:00
Campbell Barton 49594c37ae License headers: use SPDX-FileCopyrightText for CMake files 2023-06-14 23:36:23 +10:00
Sergey Sharybin bd6b0bac88 Update references to the new projects platform and main branch 2023-02-07 14:18:19 +01:00
Sergey Sharybin 3b35d9d667 Fix T100905: Official releases have the wrong branch in buildinfo
This is really old decision which should have been revisited as soon
as an overlapped release cycle was introduced.

The initial reasoning for such branch name override was to make it so
corrective releases have the same branch as the initial release when
we followed fully linear release cycle.

Nowadays such branch override is confusing and could even be misleading.

There are no add-ons using this property so it is very unlikely that
this is a breaking change.
2022-11-16 14:55:25 +01:00
Campbell Barton 998ace3463 Cleanup: use lowercase function calls & macros in for CMake
This is already the case for most CMake usage.
Although some find modules are an exception to this, as they were
originally maintained externally they use some different conventions.

Also corrected bad indentation in: intern/cycles/CMakeLists.txt
2022-09-23 14:33:44 +10:00
Campbell Barton 1df8a5f8fb File headers: use SPDX license for CMake files 2022-02-11 14:23:56 +11:00
Leon Zandman 865d1889da Cleanup: spelling
Includes fixes to misspelled function names.

Ref D11280
2021-05-21 22:23:07 +10:00
Campbell Barton 9762a0992b CMake: configue_file() to pass strings for build-info
Using configue_file(..) would have avoided the breakage from
1daa3c3f0a, caused by buildinfo not properly escaping quotes.

Rely on CMake to escaping strings instead using configure_file().
2020-11-06 17:26:29 +11:00
Campbell Barton 2bd8f7e059 Cleanup: use string APPEND/PREPEND
Replace 'set' with 'string(APPEND/PREPEND ...)'.
This avoids duplicating the variable name.
2020-11-06 12:32:54 +11:00
Bernhard M. Wiedemann ea6c9f17bd Use cmake TIMESTAMP for BUILD_DATE+TIME
Use cmake TIMESTAMP for BUILD_DATE+TIME
this simplifies code a lot
and even makes it more portable to other platforms

TIMESTAMP is available since cmake-2.8.11 ; blender already requires
cmake>=3.5 so that is fine.

Note that with CMake>=3.8, if defined, the SOURCE_DATE_EPOCH envvar
will be used by CMake here.

Reviewers: mont29, campbellbarton

Reviewed By: mont29, campbellbarton

Differential Revision: https://developer.blender.org/D5760
2019-09-18 23:04:23 +02:00
Campbell Barton 3076d95ba4 Cleanup: use 2 space indentation for CMake 2019-04-17 06:35:54 +02:00
Sergey Sharybin 593ed1347c Build info: Ensure hash length is same across all platforms and has no conflicts
The original issue was that different platforms will use different
hash lengths, just because defaults on Git client were different.

Now we use explicit length for the hash, and length is the same as
is used for short hashes in Linux -- apparently they started to have
collisions with length of 11.
2018-12-19 12:56:32 +01:00
Campbell Barton bcc8c04db4 Cleanup: code style & cmake 2017-03-12 02:47:53 +11:00
Sergey Sharybin 9937f28877 Buildinfo: Improve behavior with detached HEAD
Try real hard to detect which branch we've detached from.
2016-09-22 15:01:01 +02:00
Campbell Barton a18f4d2bc6 CMake: optional date/time overrides for reproducible builds 2016-05-11 02:47:38 +10:00
Sergey Sharybin cc2138888a CMake: Avoid call of find_package(Git) for every compile with buildinfo enabled
This is a bit tricky, find_package(Git) was only used to check if git is installed
and actual git command was assumed to be in the PATH (while ideally it should have
been GIT_COMMAND variable).

This commit makes re-compile output cleaner, especially when using Ninja.

Adding proper GIT_COMMAND to buildinfo.cmake is also possible via argument.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1847
2016-03-11 14:46:18 +05:00
Sergey Sharybin a96dbe5bca CMake: Remove redundant print of Git Found message
find_package(Git) will already print this.
2016-03-03 13:12:50 +05:00
Brecht Van Lommel 2a97c17549 CMake: minor message cleanups. 2015-10-10 17:35:30 +02:00
Campbell Barton c8ebc8736e CMake: Fix building w/o FindGit 2015-09-03 01:24:25 +10:00
Campbell Barton 1e10e4e2e3 Fix error when getting the commit time fails
While this should work, allow the build to succeed if for some reason the command fails.
2015-07-19 09:51:49 +10:00
Sergey Sharybin 6de12b1b43 CMake: Suppress unconfigured branch upstream error in the output 2015-03-20 13:59:05 +05:00
Campbell Barton f283f57432 CMake: cleanup, namespace & unused vars
also add macro 'print_all_vars()', if(0)'d - debugging only.
2014-11-16 13:04:10 +01:00
Campbell Barton e56de9d9d5 Remove SVN references 2014-08-06 05:46:31 +10:00
Campbell Barton ea9d94cf28 Spelling 2014-08-06 05:41:14 +10:00
Sergey Sharybin 38d6841687 Need to consider blender-v* a release branch, not just blender-
This is because of blender-tiles branch we've got..
2014-06-16 15:16:18 +06:00
Sergey Sharybin 0125ae1eb2 Forgot this in previous commit 2014-06-16 15:13:01 +06:00
Sergey Sharybin 43b5f0af2d tweaks to buildinfo
We wouldn't really have release branches, building will happen
from annotated tags.

Made it so building tag revision equals to a master branch.
2014-03-07 18:27:16 +06:00
Sergey Sharybin 28f3cc3eb7 Fixes for buildinfo hash/branch detection
Branch name and hash didn't work properly when having disconnected
HEAD or when having current HEAD below upstream.
2014-02-20 21:43:30 +06:00
Campbell Barton a7ac6481ef CMake: report messages as status (else ccmake treats like an error) 2013-12-10 13:18:46 +11:00
Sergey Sharybin 5f2400414a Buildinfo: suppress error prints when building local branches
Before this console output contained messages about branch is not
configured to use any upstream branch which is not useful information
at all.
2013-11-29 18:44:45 +06:00
Sergey Sharybin af7a2a3b6a Fix buildinfo hash for cases there's no upstream set for the branch 2013-11-28 02:25:09 +06:00
Sergey Sharybin 1d2c4357d5 Fix for previous fix (tm) commit
Ok, this is nasty. SOURCE_DIR is somehow being defined
from CMakeLists.txt in source/creator by the looks of it
and actual issue as extra slash in the end of path which
was passing to EXISTS command.
2013-11-28 02:05:06 +06:00
Sergey Sharybin cccee66290 Fixes for buildinfo
- It was using SOURCE_DIR which is undefined on windows.
  No idea why it was defined on Linux, could be some
  co-incident. Correct usage is CMAKE_SOURCE_DIR.

- Remove usages of SVN's revision.
2013-11-28 01:43:37 +06:00
Sergey Sharybin 551f3eef74 Show hash from latest pushed commit in buildinfo
Before this hash of latest local commit was used,
which is not so much useful since nobody can access
that commit hash.
2013-11-25 16:25:35 +06:00
Sergey Sharybin 50fbebe0a4 Buildinfo fixes
- Use -M suffix if working tree does have uncommitted
  modifications.
- Local commits are considered local changes as well
2013-11-19 22:22:21 +06:00
Sergey Sharybin 09ecfc318c Fixes for buildinfo of exported source tree
- Better to set branch/hash to "unknown" so
  it's clear build is done from exported tree.
- SCons used to reference undefined variable.
2013-11-17 00:02:27 +06:00
Sergey Sharybin 3e87abb4be Remove nested check for .git folder exists in buildinfo.cmake
Title says it all :)

Pointer by IRIE Shinsuke in the ML, thanks!
2013-11-16 19:40:26 +06:00
Sergey Sharybin 927dea436e Further tweaks to buildinfo
Summary:
Old idea with changes since previous release tag
didn't work good enough. In most of the cases tag
was done in a branch hence not actually reachable
from the master branch.

Now change since release is gone, and date of
the latest commit is used instead.

The date is displayed in format YYYY-MM-DD HH:mm
in the splash.

New bpy.app fields:

- build_commit_timestamp is an unix timestamp of
  the commit blender was build from.
- build_commit_date is a date of that commit.
- build_commit_time is a time of that commit.

Reviewers: campbellbarton

Differential Revision: http://developer.blender.org/D5
2013-11-15 18:05:27 +06:00
Sergey Sharybin 2010c6ad6c Made buildinfo aware of builds from GIT
- Use commit number since last annotated tag as a
  revision number replacement. It'll eb followed
  by 'M' symbol if there're local modification in
  the source tree.

- Commit short SHA1 is included. Helps getting
  information about commit used to build blender
  with much faster.

- If build is not done from master branch, this also
  will be noticed in the splash screen.

This commit also replaces revision stored in the
files with git-specific fields (change and hash).
This is kind of breaks compatibility, meaning
files which were saved before this change wouldn't
display any information about which revision they
were saved with. When we'll finally switch to git,
we'll see proper hash and change number since
previous release in the files, for until then
svn version will be used as a change number and
hash will be empty.

Not a huge deal, since this field was only used
by developers to help torubleshooting things and
isn't needed for blender itself.

Some additional tweaks are probably needed :)
2013-11-04 13:21:39 +00:00
Campbell Barton 817273931a buildinfo is now quoted from the build systems, avoids stripping quotes on startup.
tested with linux/cmake linux/scons windows/cmake/mingw windows/cmake/msvc
2011-08-22 12:24:14 +00:00
Guillermo S. Romero 5005853d40 Fix buildinfo, as pointed by IRIE Shinsuke.
Added a note about doubtful "copy if different".
2011-02-25 06:03:01 +00:00
Guillermo S. Romero aa9c91f01a Make buildinfo not fail with git-svn as suggested by Nicholas Bishop.
Improve formating and comments a bit.
2011-02-25 04:02:58 +00:00
Guillermo S. Romero 4b4281f2e2 SVN maintenance. 2011-02-25 00:02:08 +00:00
Campbell Barton b8e3f4ee30 fix for cmake not having the correct svn revision in buildinfo, now generate a header every build with the time, date, svn revision. 2011-02-24 17:57:35 +00:00