Git is always used to generate the KiCad version string using the
command `git describe --dirty`. This gives a more concise and
accurate version string than the previous method. When git is not
available, the version string defaults to the value defined in
KiCadVersion.cmake. It is imperative that moving forward that the
default version string be updated the commit following a git tag
so that when git is not available, the last known commit following
a git tag will at least give some usable information about which
development branch of KiCad was used for a build.
Both official one and KiCad one version of FindwxWidgets.cmake do not check if
all the required components are part of the wxWidgets build. This couses trouble
on Ubuntu when user misses libwxgtk3.0-dev package - CMake succeeds, build does
not.
This fix was accepted also to the CMake 3.9 upstream
(https://gitlab.kitware.com/cmake/cmake/merge_requests/704).
Fixes: lp:1630020
* https://bugs.launchpad.net/kicad/+bug/1630020
Define empty string variable KICAD_BRANCH_NAME that can be used as an
optional version string element. When git is used to build the version
string, this variable is set to the git branch name. It can also be
defined at configuration time as an optional string appended to the
$KICAD_VERSION variable.
Define empty string variable KICAD_VERSION_EXTRA that can be set by
the user at configuration.
The variables KICAD_BRANCH_NAME and KICAD_VERSION_EXTRA are only
appended to KICAD_VERSION if they are set. Otherwise, only KICAD_VERSION
is uses as the version string.
Update the developer building from source document to reflect the changes.
When the version string in KiCadVersion.cmake is set to something other
than the default "no-vcs-found", it ignores the git version even if a
.git folder exists in the source folder.
Remove the KICAD_REPO_NAME option from the main cmake file and the
generated config.h file since it is no longer used.
Set the default branch name to "undefined" in CreateGitVersionHeader.cmake
instead of the KICAD_REPO_NAME option.
Remove generating KICAD_FULL_VERSION from CreateGitVersionHeader.cmake
and add it to WriteVersionHeader.cmake so that the default settings and
the new KiCadVersion.cmake definitions can be used to generate the full
version string as well.
Check to see if the branch name is set and only use the version to
generate the full version string. This allows the use of the KiCad
version cmake file to create a version only string like "4.0.4" with
no trailing branch name.
Change build_version.cpp to use the full version string rather than
concatenating the version and branch strings.
Add KiCadVersion.cmake to set the build version and branch name.
Update WriteVersionHeader.cmake to include KiCadVersion.cmake to set
the defaults in case no .git directory is found.
This commit also simplifies the rewrite logic slightly, removing the
regex parsing.
Bug introduced in:
commit 47772e7ae3
Author: Chris Pavlina <pavlina.chris@gmail.com>
Date: Sun Sep 25 10:28:50 2016 -0400
cmake: rewrite version header when branch changes
Before, only KICAD_BUILD_VERSION, which includes the hash but not the
branch, was compared when deciding whether to regenerate
kicad_build_version.h. This header also contains the branch name though,
so we should compare both to address the case of two branches pointing
at the same commit.
Before, only KICAD_BUILD_VERSION, which includes the hash but not the
branch, was compared when deciding whether to regenerate
kicad_build_version.h. This header also contains the branch name though,
so we should compare both to address the case of two branches pointing
at the same commit.
*) Extend SWIG support deeper into the BOARD class.
*) Move swig *.i files into a directory identified for SWIG, in preparation
for a parallel universe involving Phoenix's SIP.
*) Move swig files which will be common to both eeschema and pcbnew into
common/swig.
*) Sketch out a "common" python module, and plan on dovetailing that into a
libkicad_shared.{dll,so}
*) Add common/swig/ki_exceptions.i and define a macro HANDLE_EXCEPTIONS()
which is to be applied to any function which needs C++ to python
exception translation.
*) Move the test for SWIG tool into top level CMakeLists.txt file for use
in all python modules beyond pcbnew, i.e. eeschema and common.
*) Add SWIG_MODULE_pcbnew_EXTRA_DEPS which generates a better Makefile, one
which rebuilds the swig generated *.cxx file when one of its dependencies
change.
*) Re-architect the board.i file so that it can be split into multiple *.i
files easily.
*) Make some KIWAY from python progress, in preparation for Modular KiCad
phase III.
It is no longer necessary (or sensible) to include a simulated bzr
revision number, and we can reliably get a branch name now. Therefore,
the new version strings look like:
(2016-08-26 revision 67230ac)-master
| | |
| | branch name, "HEAD" if not on a branch,
| | or "unknown" if no .git present
| |
| abbreviated commit hash, or no-git if no .git
| present
|
date of commit, or date of build if no .git present
Signed-off-by: Chris Pavlina <pavlina.chris@gmail.com>
* Factor out PROPERTIES object from the PCB plugin code and move it into
common so it can be used by both the Pcbnew and Eeschema plugins.
* Add schematic I/O plugin manager for loading and saving schematic and
component library files.
* Add initial attempt at a parser for current schematic file format. This
parser will be infinitely more strict than the current parser which is very
forgiving in what it parses.
* Make minor changes to the base bitmap class to support the new parser.
* Add find root sheet support to sheet object to allow fetching the root
sheet from any sheet in the stack.
* Remove tasks that are not going to be completed by FOSDEM 2017 release
(hopefully) announcement.
* Update item task lists to reflects changes discussed at CERN meeting.
* Update item status to reflect the current state of the tasks.
* Add a few new changes that are slated for release.
* Revise the generic road map by deleting complete items and adding new items
discussed at CERN meeting.
* Remove unused definition from config.h.cmake.
* The FindSWIG.cmake shipped with CMake 3.0 does not yet look for the
"cmake3.0" binary, this was added shortly after the 3.0 release.
* This file can be removed once the minimum CMake version is 3.1 or greater.
* Remove download and build Boost from source and all CMake boost source build
dependencies.
* Make FindCairo.cmake use pkg-config when it's available not just all
platforms except windows.
* Add version checking to FindCairo.cmake.
* Change find GML version to 0.9.5.1 which is the current version in Ubuntu
14.04 LTS.
* Update required Cairo version to 1.12.1.
* Fix broken include path in FindGLM.cmake ( credit Cirilo Bernardo ).
* Fix if()/endif() warning in FindGLM.cmake.
* Remove trailing white space in FindGLM.cmake.
* Fix bug introduced in r6363 that inadvertently made OpenMP a required
dependency instead of an optional dependency.
* Remove quiet flag for FindOpenMP to report findings.
* Bump minimum CMake revision to 2.8.12. The CMake position independent code
handling was introduced in CMake 2.8.9 but 2.8.12 is current version in
Ubuntu 14.04 LTS which is a very popular distro.
* CMake provides a simple declarative statement to enable PIC, so no compiler
dependent handling is required.
* There is also no need to tell Boost to build with -fPIC, their build system
is smart enough.
CMake 3.0 defines two new variables:
* CMAKE_CXX_VISIBILITY_PRESET and
* CMAKE_VISIBILITY_INLINES_HIDDEN
to control whether symbols not explicitly tagged for export are implicitly
exported. Because only version 3.3 and later also applies that to static
libraries when in 3.3 mode, compatibility code is added as well.
When the minimum required version is bumped to 3.3, this code becomes
obsolete and a warning is displayed that the compatibility code should be
removed as well.
* Add CreateGitVersionHeader.cmake to extract git version information to create the kicad version
header.
* Add check for .git folder in source path to trigger git version CMake macro.
* Use CMake add_custom_target() to run WriteVersionHeader.cmake as a command.
* Modify WriteVersionHeader.cmake to be run as a command instead of a macro.
* Add version header creation as a CMake common library build dependency.
* Add cached CMake variable KICAD_BUILD_VERSION when build version is defined during
configuration.
* Fix CMake macro create_bzr_version_header to always update version.h file whenever a repo change
is found. Running `make rebuild_cache is no longer required.
* Add new CMake function for writing version.h file.
* Always use version.h file for build version string instead of meaningless hard coded date.
* Only use bzr version string when build version is not defined at configuration time for stable release
version strings.
* Minor cleanup of FindBazaar.cmake.
* Remove unnecessary version.h.cmake file.
* Remove redundant definition of KICAD_DATA_PATH since DEFAULT_INSTALL_PATH
was already defined.
* Use DEFAULT_INSTALL_PATH as the substitution for the default environment
variable paths.
* Add option to define DEFAULT_INSTALL_PATH during CMake configuration with
fall back to CMAKE_INSTALL_PREFIX if not not defined.
* Developer note: this change is primarily for package builders where
CMAKE_INSTALL_PATH is the path where the package builder temporarily
installs the build output before creating the package. When building
packages, DEFAULT_INSTALL_PATH should be set to the path where the
package will be installed by default.
* Fixed incorrect parameter ordering in gEDA footprint library parser
which read drill diameter, pad clearance and solder mask clearance.
* Fix FindOpenSSL.cmake version detect bug which was exposed by OpenSSL
version 1.0.2.
* Fix default KISYSMOD/KISYS3DMOD (#ifdef typo) for OSX builds.
* Remove setting KIGITHUB from kicad/pcbnew Info.plist in favor of hardcoded default
setting for OSX builds.
* Remove now unneeded Set3DShapesDefaultPath() and other small things.
* Add support for setting python site package path to PYTHON_SITE_PACKAGE_PATH.
* Move configure_file() so WXPYTHON_VERSION is already initialized before creating
config.h (Duh!).
* Add status message to indicate the version of wxPython found.
* Add test to CMakeLists.txt to verify wxPython is installed when
KICAD_SCRIPTING_WXPYTHON=ON.
* Add test to make sure wxPython version major and minor numbers match
the version of wxWidgets found.
* Add code to set the correct version of wxPython to the python scripting
initialization code.
* Minor code simplification in Pcbnew KIFACE main window creation.
These settings are now not common to the board editor, because the footprint editor can be run outside the board editor.
download_boost.cmake: ignore .htm* files when installing boost. They are not used, and often have a very very long (and stupid) name which sometimes creates issues.
* Move all Windows install subfolders from ${CMAKE_INSTALL_PREFIX}/share/ to
${CMAKE_INSTALL_PREFIX}/share/kicad/.
* Remove unused define DEFAULT_FP_LIB_PATH from build configuration.
* Remove Boost target when skipping internal Boost build.
* Update INSTALL.txt to reflect install tree changes.
* Add FindOpenSSL.cmake from CMake 3.0.2.
* Change MinGW find library to find libssl and libcrypto as well as libeay32 and ssleay32. Apparently
at some point OpenSSL changed the library file names for MinGW.
* Stop find_library() from looking in system paths and returning the actual DLLs rather than the link
libraries.
* Remove CMakeParseArguments.cmake to use the version that ships with CMake.
* Remove FindPackageHandleStandardArgs.cmake to use the version that ships
with CMake.
* Remove FindPythonLibs.cmake to use the version that ships with CMake.
* Edit FindPythonInterp.cmake to use the stock CMake version of
FindPackageHandleStandardArgs.cmake since the local version was removed.