Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
994e4e5d
Commit
994e4e5d
authored
May 05, 2008
by
stambaughw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Subversion to automatically generate date and version information when building with CMake.
parent
9021d9d0
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
3 deletions
+45
-3
CMakeLists.txt
CMakeLists.txt
+24
-2
config.h.cmake
CMakeModules/config.h.cmake
+8
-0
change_log.txt
change_log.txt
+7
-0
build_version.h
include/build_version.h
+6
-1
No files found.
CMakeLists.txt
View file @
994e4e5d
...
...
@@ -25,6 +25,23 @@ if(CMAKE_COMPILER_IS_GNUCXX)
set
(
CMAKE_CXX_FLAGS_DEBUG
"-Wall -g3 -ggdb3 -DDEBUG"
)
endif
(
CMAKE_COMPILER_IS_GNUCXX
)
# Include Subversion support to automagically create version header file.
find_package
(
Subversion
)
if
(
Subversion_FOUND
)
Subversion_WC_INFO
(
${
PROJECT_SOURCE_DIR
}
Kicad
)
string
(
REGEX REPLACE
"^([0-9]+)
\\
-([0-9]+)
\\
-([0-9]+).*"
"
\\
1
\\
2
\\
3"
_kicad_svn_date
${
Kicad_WC_LAST_CHANGED_DATE
}
)
set
(
KICAD_SVN_VERSION
"(
${
_kicad_svn_date
}
SVN-R
${
Kicad_WC_LAST_CHANGED_REV
}
)"
)
# Definition to conditionally use date and revision returned from the
# Subversion info command instead of hand coded date and revision in
# "include/build_verison.h". If subversion is not found or the hand
# coded make files are used then the date and version information must
# be manually edited.
add_definitions
(
-DHAVE_SVN_VERSION
)
endif
(
Subversion_FOUND
)
# Locations for install targets.
set
(
KICAD_BIN bin CACHE PATH
"Location of KiCad binaries."
)
...
...
@@ -78,10 +95,15 @@ include(${wxWidgets_USE_FILE})
# Include MinGW resource compiler.
include
(
MinGWResourceCompiler
)
# Generate config.h.
configure_file
(
${
CMAKE_SOURCE_DIR
}
/CMakeModules/config.h.cmake
${
CMAKE_BINARY_DIR
}
/config.h
)
# Include paths.
include_directories
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/include
${
CMAKE_CURRENT_SOURCE_DIR
}
/share
)
${
CMAKE_SOURCE_DIR
}
/include
${
CMAKE_SOURCE_DIR
}
/share
${
CMAKE_BINARY_DIR
}
)
# CMake will look in these dirs for nested 'CMakeLists.txt' files.
# Binaries.
...
...
CMakeModules/config.h.cmake
0 → 100644
View file @
994e4e5d
/* Do not modify this file, it was automatically generated by CMake */
#ifndef __KICAD_SVN_VERSION_H__
#define __KICAD_SVN_VERSION_H__
#cmakedefine KICAD_SVN_VERSION "@KICAD_SVN_VERSION@"
#endif /* __KICAD_SVN_VERSION_H__ */
change_log.txt
View file @
994e4e5d
...
...
@@ -5,6 +5,13 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
email address.
2008-May-2 UPDATE Wayne Stambaugh <stambaughw@verizon.net>
================================================================================
+cmake
* Use Subversion to automatically generate build date and revision level
when building with CMake. Header file build_version.h will still need
manual updates when using the hand written make files.
2008-May-2 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
...
...
include/build_version.h
View file @
994e4e5d
...
...
@@ -5,7 +5,12 @@
COMMON_GLOBL
wxString
g_BuildVersion
#ifdef EDA_BASE
# ifdef HAVE_SVN_VERSION
# include "config.h"
(
wxT
(
KICAD_SVN_VERSION
))
# else
(
wxT
(
"(20080429-r1010)"
))
# endif
#endif
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment