Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
6d3b3bfd
Commit
6d3b3bfd
authored
9 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Faster compilation
parent
08e4da34
No related branches found
No related tags found
1 merge request
!155
Faster compilation
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
.gitignore
+1
-1
1 addition, 1 deletion
.gitignore
src/Makefile.am
+10
-10
10 additions, 10 deletions
src/Makefile.am
src/version.c
+3
-0
3 additions, 0 deletions
src/version.c
src/version.h
+6
-15
6 additions, 15 deletions
src/version.h
src/version_string.h.in
+32
-0
32 additions, 0 deletions
src/version_string.h.in
with
52 additions
and
26 deletions
.gitignore
+
1
−
1
View file @
6d3b3bfd
...
@@ -11,7 +11,7 @@ config.sub
...
@@ -11,7 +11,7 @@ config.sub
ltmain.sh
ltmain.sh
libtool
libtool
src/version.h
src/version
_string
.h
swift*.tar.gz
swift*.tar.gz
doc/doxyfile.stamp
doc/doxyfile.stamp
doc/html/
doc/html/
...
...
This diff is collapsed.
Click to expand it.
src/Makefile.am
+
10
−
10
View file @
6d3b3bfd
...
@@ -36,7 +36,7 @@ endif
...
@@ -36,7 +36,7 @@ endif
include_HEADERS
=
space.h runner.h queue.h task.h lock.h cell.h part.h const.h
\
include_HEADERS
=
space.h runner.h queue.h task.h lock.h cell.h part.h const.h
\
engine.h swift.h serial_io.h timers.h debug.h scheduler.h proxy.h parallel_io.h
\
engine.h swift.h serial_io.h timers.h debug.h scheduler.h proxy.h parallel_io.h
\
common_io.h single_io.h multipole.h map.h tools.h partition.h clocks.h parser.h
\
common_io.h single_io.h multipole.h map.h tools.h partition.h clocks.h parser.h
\
physical_constants.h physical_constants_cgs.h potentials.h
physical_constants.h physical_constants_cgs.h potentials.h
version.h
# Common source files
# Common source files
AM_SOURCES
=
space.c runner.c queue.c task.c cell.c engine.c
\
AM_SOURCES
=
space.c runner.c queue.c task.c cell.c engine.c
\
...
@@ -72,27 +72,27 @@ libswiftsim_mpi_la_CFLAGS = $(AM_CFLAGS) -DWITH_MPI $(METIS_INCS)
...
@@ -72,27 +72,27 @@ libswiftsim_mpi_la_CFLAGS = $(AM_CFLAGS) -DWITH_MPI $(METIS_INCS)
libswiftsim_mpi_la_SHORTNAME
=
mpi
libswiftsim_mpi_la_SHORTNAME
=
mpi
# Versioning. If any sources change then update the version.h file with
# Versioning. If any sources change then update the version
_string
.h file with
# the current git revision and package version.
# the current git revision and package version.
# May have a checkout without a version.h file and no git command (tar/zip
# May have a checkout without a version
_string
.h file and no git command (tar/zip
# download), allow that, but make sure we know it.
# download), allow that, but make sure we know it.
version.h
:
version.h.in $(AM_SOURCES) $(include_HEADERS) $(noinst_HEADERS)
version
_string
.h
:
version
_string
.h.in $(AM_SOURCES) $(include_HEADERS) $(noinst_HEADERS)
if
test
"X
$(
GIT_CMD
)
"
!=
"X"
;
then
\
if
test
"X
$(
GIT_CMD
)
"
!=
"X"
;
then
\
GIT_REVISION
=
`
$(
GIT_CMD
)
describe
--abbrev
=
8
--always
--tags
--dirty
`
;
\
GIT_REVISION
=
`
$(
GIT_CMD
)
describe
--abbrev
=
8
--always
--tags
--dirty
`
;
\
GIT_BRANCH
=
`
$(
GIT_CMD
)
branch |
sed
-n
's/^\* \(.*\)/\1/p'
`
;
\
GIT_BRANCH
=
`
$(
GIT_CMD
)
branch |
sed
-n
's/^\* \(.*\)/\1/p'
`
;
\
sed
-e
"s,@PACKAGE_VERSION
\@
,
$(
PACKAGE_VERSION
)
,"
\
sed
-e
"s,@PACKAGE_VERSION
\@
,
$(
PACKAGE_VERSION
)
,"
\
-e
"s,@GIT_REVISION
\@
,
$${
GIT_REVISION
}
,"
\
-e
"s,@GIT_REVISION
\@
,
$${
GIT_REVISION
}
,"
\
-e
"s|@GIT_BRANCH
\@
|
$${
GIT_BRANCH
}
|"
version.h.in
>
version.h
;
\
-e
"s|@GIT_BRANCH
\@
|
$${
GIT_BRANCH
}
|"
version
_string
.h.in
>
version
_string
.h
;
\
else
\
else
\
if
test
!
-f
version.h
;
then
\
if
test
!
-f
version
_string
.h
;
then
\
sed
-e
"s,@PACKAGE_VERSION
\@
,
$(
PACKAGE_VERSION
)
,"
\
sed
-e
"s,@PACKAGE_VERSION
\@
,
$(
PACKAGE_VERSION
)
,"
\
-e
"s,@GIT_REVISION
\@
,unknown,"
\
-e
"s,@GIT_REVISION
\@
,unknown,"
\
-e
"s,@GIT_BRANCH
\@
,unknown,"
version.h.in
>
version.h
;
\
-e
"s,@GIT_BRANCH
\@
,unknown,"
version
_string
.h.in
>
version
_string
.h
;
\
fi
;
\
fi
;
\
fi
fi
# Make sure version.h is built first.
# Make sure version
_string
.h is built first.
BUILT_SOURCES
=
version.h
BUILT_SOURCES
=
version
_string
.h
# And distribute the built files.
# And distribute the built files.
EXTRA_DIST
=
version.h version.h.in
EXTRA_DIST
=
version
_string
.h version
_string
.h.in
This diff is collapsed.
Click to expand it.
src/version.c
+
3
−
0
View file @
6d3b3bfd
...
@@ -40,6 +40,9 @@
...
@@ -40,6 +40,9 @@
/* This object's header. */
/* This object's header. */
#include
"version.h"
#include
"version.h"
/* Local headers. */
#include
"version_string.h"
/**
/**
* @brief Return the source code git revision
* @brief Return the source code git revision
*
*
...
...
This diff is collapsed.
Click to expand it.
src/version.h
.in
→
src/version.h
+
6
−
15
View file @
6d3b3bfd
...
@@ -2,33 +2,24 @@
...
@@ -2,33 +2,24 @@
* This file is part of SWIFT.
* This file is part of SWIFT.
* Copyright (c) 2012 Matthieu Schaller (matthieu.schaller@durham.ac.uk).
* Copyright (c) 2012 Matthieu Schaller (matthieu.schaller@durham.ac.uk).
* Copyright (c) 2015 Peter W. Draper (p.w.draper@durham.ac.uk).
* Copyright (c) 2015 Peter W. Draper (p.w.draper@durham.ac.uk).
*
*
* This program is free software: you can redistribute it and/or modify
* 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
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public License
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*
******************************************************************************/
******************************************************************************/
#ifndef SWIFT_VERSION_H
#ifndef SWIFT_VERSION_H
#define SWIFT_VERSION_H
#define SWIFT_VERSION_H
/**
* @file version.h
* @brief Package version, git revision sha and compiler info.
*/
#define PACKAGE_VERSION "@PACKAGE_VERSION@"
#define GIT_REVISION "@GIT_REVISION@"
#define GIT_BRANCH "@GIT_BRANCH@"
const
char
*
package_description
(
void
);
const
char
*
package_description
(
void
);
const
char
*
package_version
(
void
);
const
char
*
package_version
(
void
);
const
char
*
git_revision
(
void
);
const
char
*
git_revision
(
void
);
...
@@ -36,8 +27,8 @@ const char* git_branch(void);
...
@@ -36,8 +27,8 @@ const char* git_branch(void);
const
char
*
compiler_name
(
void
);
const
char
*
compiler_name
(
void
);
const
char
*
compiler_version
(
void
);
const
char
*
compiler_version
(
void
);
const
char
*
mpi_version
(
void
);
const
char
*
mpi_version
(
void
);
const char
*hdf5_version(void);
const
char
*
hdf5_version
(
void
);
const char
*metis_version(void);
const
char
*
metis_version
(
void
);
void
greetings
(
void
);
void
greetings
(
void
);
#endif
/* SWIFT_VERSION_H */
#endif
/* SWIFT_VERSION_H */
This diff is collapsed.
Click to expand it.
src/version_string.h.in
0 → 100644
+
32
−
0
View file @
6d3b3bfd
/*******************************************************************************
* This file is part of SWIFT.
* Copyright (c) 2012 Matthieu Schaller (matthieu.schaller@durham.ac.uk).
* Copyright (c) 2015 Peter W. Draper (p.w.draper@durham.ac.uk).
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#ifndef SWIFT_VERSION_STRING_H
#define SWIFT_VERSION_STRING_H
/**
* @file version_string.h
* @brief Package version, git revision sha and compiler info.
*/
#define PACKAGE_VERSION "@PACKAGE_VERSION@"
#define GIT_REVISION "@GIT_REVISION@"
#define GIT_BRANCH "@GIT_BRANCH@"
#endif /* SWIFT_VERSION_STRING_H */
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment