Erwin Janssen [Sat, 3 Jun 2017 09:47:10 +0000 (11:47 +0200)]
Move two checks from features/sfio into the code
Two checks in features/sfio performed a sizeof comparison to set a
define. This comparison could be moved into the code, where sizeof
comparisons are already being used.
Erwin Janssen [Tue, 30 May 2017 20:42:27 +0000 (22:42 +0200)]
Move function checks features/sfio to configure.ac
The following function checks have been moved:
- ftruncate
- lseek64
- getpagesize (was already present in configure.ac)
- select (check for 5 arg interface no longer required)
- stat64
- unlink
- vfork
- waitpid
The following function checks have been removed becuase they were
not used:
- remove
that gets written to man pages
in order to allow for reproducible builds.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.
Fix the tred algorithm for better performance, making it roughly quadratic.
Also replace the recursive DFS with an explicit stack to prevent stack overflow.
The latter is probably not necessary, as real-life DAGs shouldn't have that many layers.
Erwin Janssen [Thu, 18 May 2017 08:31:55 +0000 (10:31 +0200)]
Update Cairo and Pango dependencies for Windows
Update the libraries and dependencies for Cairo, Pango and Pangocairo to
the latest version available, both for x86 and x64. This also eliminates
the need for the pangomodules.exe to be called.
Erwin Janssen [Sun, 14 May 2017 14:11:45 +0000 (16:11 +0200)]
Convert current Visual Studio build from MT to MD
The CMake build generates MD code (which required a vcredist to be bundled
with the binaries). The current Visual Studio build generated MT code
(which doesn't require a vcredist). Both types require different 3rd party
libraries, so for consistancy reasons, the current Visual Studio build is
converted to MD.
Erwin Janssen [Sun, 14 May 2017 10:33:59 +0000 (12:33 +0200)]
Replace ltdl with compatibility header on Windows
Using libtool on Win64 proved to be a pain, because native Windows
binaryies for 64bit where not found. Instead, it's also possible to use
the native Windows API to load libraries. The new ltdl.h header provides
compatibility functions for this, so minimal source code changes were
required.
These dependencies had the following changes:
- rxspencer became a lib-only library
- libexpat became expat
- The 64bit version of ltdl required cygwin1.dll
The windows dependencies submodule now includes the static version of
zlib when building Graphviz. Some third party DLLs might still require a
zlib.dll however, but this will be added when required.
Set different dependency dir if 64bit VS generator
When including "Win64" in the Visual Studio generator name, a 64bit
solution is created. For this the x64 dependencies are needed, so a
different dependency directory must be specified.
The current Windows dependencies are all 32bit. To compile a 64bit
Graphviz, 64bit dependencies are required. In order to have both the
32bit and 64bit libraries, we store the 32bit libraries in the x86
folder.
Erwin Janssen [Sun, 14 May 2017 20:43:48 +0000 (22:43 +0200)]
Remove HAVE_PANGOCAIRO check from plugin/pango
The check to see if pangocairo is present should be done before including
this project in the build. Now, when pangocairo is not found, this tries
to compile when it shouldn't, resulting in strange errors.
Emden Gansner [Wed, 3 May 2017 16:00:37 +0000 (12:00 -0400)]
Fix incorrect code that should short-circuit the analysis for colors black, white and lightgrey.
It should have been && rather than ||. Just use streq.
By including `InstallRequiredSystemLibraries`, the required system
libraries are included when CPack creates a packages. The main purpose is
including the required vcruntime on Windows.
The directory cmd/tools contains multiple command line tools, these are
added to the CMake build. Because most tools shared some or most of their
settings, a CMake function could be used to set most of these settings.
The dynamic library 'gvplugin_gdiplus' is, besides from the libraries in
lib, also dependent on gdiplus. This is a Windows only library that is
assumed to be available on Windows systems. The only check added for this
project is `if(WIN32)`.
Erwin Janssen [Fri, 31 Mar 2017 11:35:52 +0000 (13:35 +0200)]
Add plugin/gd to CMake build
The dynamic library 'gvplugin_gd' is, besides from the libraries in lib,
also dependent on libgd. For this a check and CMake find module was added.
If libgd is not found, this pluging is not build.
Erwin Janssen [Fri, 31 Mar 2017 07:27:56 +0000 (09:27 +0200)]
Add Windows installer using NSIS and CPack
Create a Windows Installer using CPack and the NSIS generator. The CMake
build on Appveyor now installs Graphviz using this installer and runs the
tests using ctest. The installer is added as an artifact to the Release
build.
Also switched the order of cmake and msbuild in Appveyor and added
`clone_depth: 25` for faster cloning.
Erwin Janssen [Fri, 24 Mar 2017 09:21:24 +0000 (10:21 +0100)]
Add Python based regression tests to CMake
This commits add the Python based regression tests to CMake, after
Graphviz has been build and installed, it can be executed by running
`ctest` in the build directory.
Erwin Janssen [Mon, 20 Mar 2017 13:03:16 +0000 (14:03 +0100)]
Add general CPack information
Add a seperate file containing the CPack information. This now includes
general information shared by all CPack generators, like package name,
version and description.
Erwin Janssen [Tue, 14 Mar 2017 20:53:58 +0000 (21:53 +0100)]
Add plugin/core to CMake build
The dynamic library 'gvplugin_core' is the first library from `plugin`
added to the CMake build. It has no dependencies outside the libraries
in `lib`.
Erwin Janssen [Tue, 14 Mar 2017 20:00:16 +0000 (21:00 +0100)]
Add JSON functions to lib/gvc/gvc.def
These functions are already added to lib/gvc.def (used by the Visual
Studio build), now they are also added to lib/gvc/gvc.def (used by the
CMake build).
Erwin Janssen [Sat, 4 Mar 2017 15:26:07 +0000 (16:26 +0100)]
Add some platform checks to CMake build
Included the definition of the DEFAULT_FONTPATH in the platform check.
Also define DARWIN and DARWIN_DYLIB when compiling on OS X.
Both checks are also done in the Autotools build.
Erwin Janssen [Wed, 8 Feb 2017 20:38:41 +0000 (21:38 +0100)]
Add all header checks from configure.ac to CMake
The CMake build now checks for the same headers as the Autotools build.
The following headers checks were added:
- crt_externs.h
- fcntl.h
- memory.h
- search.h
- sys/inotify.h
- sys/ioctl.h
- sys/mman.h
- sys/select.h
- sys/time.h
- sys/vfork.h
- termios.h
- vfork.h
- X11/Intrinsic.h
- X11/Xaw/Text.h
Erwin Janssen [Tue, 7 Feb 2017 07:02:19 +0000 (08:02 +0100)]
Add lib/gvc to CMake build
The dynamic library `gvc` is the core library of Graphviz. It has various
dependencies, of which some are third party libraries. The DLLs of these
libraries will be included in the package on Windows.
Now also generating `builddate.h` on all platforms. The Windows Visual
Studio build didn't generate this file.
Now also defines GVPLUGIN_CONFIG_FILE, set to confg6, just like the
Autotools build.
Support the "enable-ltdl" option, default value is ON.
Now passing the "-fPIC" to all compilers, except MSVC.
The following checks have been added:
- FindLTDL
- FindRxSpencer (on Windows only)
Erwin Janssen [Fri, 3 Feb 2017 16:50:02 +0000 (17:50 +0100)]
Add lib/common to CMake build
The static library 'common' has no dependencies.
The following checks have been added:
- FindAWK (custom CMake module added)
- FindPerl
- FindEXPAT
- FindZLIB
- HAVE_SINCOS
- HAVE_STRINGS_H
- HAVE_SYS_TYPES_H
- HAVE_STRNCASECMP_H
The steps to generate `colortbl.h` and `ps_font_equiv.h` are the same as
in the Autotools build. DEFAULT_DPI is now set in the config.h generated
by CMake.
Erwin Janssen [Sun, 29 Jan 2017 09:51:42 +0000 (10:51 +0100)]
Disable warning C4996 on Windows CMake build
MSVC warning C4996 mostly fires on completely valid code. The changes
proposed in the warning text often seriously compromise the code
portability, while they never substantially improve the code quality.
Thus we suppress this warning.
gmlparse.y: Each identifier in dedicated statement
It is good practice to define each identifier in a dedicated statement,
various standard and style guides recommend this. Because where multiple
declarators appear in the same declaration, the type of an identifier
may not meet a developer's expectations.
It is good practice to define each identifier in a dedicated statement,
various standard and style guides recommend this. Because where multiple
declarators appear in the same declaration, the type of an identifier
may not meet a developer's expectations.
It is good practice to define each identifier in a dedicated statement,
various standard and style guides recommend this. Because where multiple
declarators appear in the same declaration, the type of an identifier
may not meet a developer's expectations.
Erwin Janssen [Fri, 31 Mar 2017 11:06:41 +0000 (13:06 +0200)]
Remove HAVE_LIBGD check from plugin/gd
This check should exist only in the build configuration, if plugin/gd gets
build, then libgd should _always_ be available. Otherwise, mistakenly
building plugin/gd without defining HAVE_LIBGD, will lead to believe that
the build is succesfull, while in truth nothing gets build.
Erwin Janssen [Fri, 31 Mar 2017 07:06:41 +0000 (09:06 +0200)]
Remove declared, not defined, function from cdt.h
Remove `dttreeset` function declaration from cdt.h. The function
definition was removed some time ago because it was not used in the
codebase, but the declaration wasn't removed properly.