Commit Graph

516 Commits

Author SHA1 Message Date
David Korth
76c229470a Fixed zlib asm optimizations on 32-bit MSVC 2015, again.
Need to set CMAKE_ASM_MASM_FLAGS in the cache in order to prevent
it from caching an empty string, resulting in ml.exe failing.
2016-10-07 21:54:17 -04:00
David Korth
5b797c6def [extlib] CMakeLists.txt: Disable zlib asm optimizations in 32-bit MSVC builds, again.
This keeps breaking on AppVeyor for some reason.
2016-10-06 21:32:26 -04:00
David Korth
257e34f2ef [minizip] Set interface include paths and remove DO_SPLIT_DEBUG().
Interface include paths are needed in order to automatically add paths
when adding minizip as a dependent library.

DO_SPLIT_DEBUG() breaks the static library:
../../../extlib/minizip/libminizip.a: error adding symbols: Archive has no index; run ranlib to add one
2016-10-04 22:15:03 -04:00
David Korth
2ae5750e9b [extlib] CMakeLists.txt: New function SET_EXTLIB_PROPERTIES().
This function sets common properties on extlib targets.

[zlib] Remove the MSVC debug path and build exclusion settings, since
these are now set by the parent CMakeLists.txt file.
2016-09-30 21:00:01 -04:00
David Korth
163c234241 [minizip] Initial import of minizip-1.1, with changes from Gens/GS II.
The FST test files will be zipped into a single ZIP archive, since
they're usually less than 4 KB each.
2016-09-18 18:21:32 -04:00
David Korth
50d8ab0297 [zlib] Re-enable ASM optimizations for MSVC.
msvc.cmake: Specify MASM flags "/W0 /safeseh". This fixes the 32-bit masm
build when using MSBUILD with MSVC 2015. 64-bit wasn't affected, though
we're setting it for all MSVC platforms.
2016-09-18 18:08:17 -04:00
David Korth
45491b4661 Simplify the Google Test build infrastructure a bit.
libromdata/tests/CMakeLists.txt:
- Link to gtest directly instead of ${GTEST_LIBRARY}.
- Removed INCLUDE_DIRECTORIES() for googletest, since it's added to
  TARGET_INCLUDE_DIRECTORIES() by googletest's CMakeLists.txt.

extlib/googletest/googletest/CMakeLists.txt:
- Uncommented gtest_hide_internal_symbols.

Removed cmake/gtest.cmake, since it doesn't have anything useful other
than INCLUDE(CTest), which is now present in the top-level CMakeLists.txt.
2016-09-14 23:18:20 -04:00
David Korth
5567d2a7d9 [zlib] CMakeLists.txt: Disable cmake_minimum_required().
This interfered with setting CMake policy CMP0063.
2016-09-08 22:15:20 -04:00
David Korth
ed7171854c [googletest] Disabled cmake_minimum_required().
This interfered with setting CMake policy CMP0063.
2016-09-05 23:12:59 -04:00
David Korth
c6053eaeae [extlib] Disable zlib assembly optimizations for now.
It's breaking on AppVeyor, which uses MSVC 2015.
2016-09-04 02:46:31 -04:00
David Korth
2825416d8c [zlib] CMakeLists.txt: Set TARGET_INCLUDE_DIRECTORIES() on the library targets. 2016-09-03 23:33:01 -04:00
David Korth
db82a5d897 [zlib] Initial import of zlib-1.2.8, with changes from Gens/GS II and mcrecover.
Unlike the aforementioned two programs, this copy of zlib will *only*
be used for Windows builds, and it will only be used for test suites.
We're using GDI+ instead of libpng, so the only reason we need zlib
is to decompress the compressed reference BMP images used by
RpImageLoaderTest.

Changes compared to upstream zlib-1.2.8:

- Non-CMake build infratsructure has been removed.

- CMakeLists.txt has been edited to prevent building the Win32 resource
  data when being built as a shared library.

- Example binaries are no longer built.

- The GZip functions are now prefixed with "mcr_z_" in order to prevent
  function naming conflicts with Qt4/Win32, which has its own copy of
  zlib that exposes the same functions.

- The OF() and ON() macros have been renamed to _Z_OF() and _Z_ON().
  Based on Gentoo's zlib-1.2.8 patches.

- contrib/ has been stripped of everything but asm-optimized functions.

- 64-bit assembly-optimized routines now check for __x86_64__ in addition
  to __amd64__ for compatibility with certain compilers, e.g. icc.

- CMakeLists.txt adds -DZLIB_CONST to the zlib and zlibstatic targets'
  compile definitions.
2016-09-03 23:25:05 -04:00
David Korth
480675a5ea [extlib] Add CMakeLists.txt and googletest/_MODIFIED_GTEST.txt.
I really need to check for untracked files before committing.
2016-09-02 22:58:29 -04:00
David Korth
4c65f452c7 [googletest] Force static library builds. 2016-09-02 22:57:44 -04:00
David Korth
8c8a444f7b [googletest] Disabled INSTALL() rules.
We aren't installing googletest or googlemock, and because we're setting
EXCLUDE_FROM_ALL, cmake complains about the INSTALL() rules.
2016-09-02 22:23:31 -04:00
David Korth
ddbfadd715 [gtest] Initial import of Google Test 1.8.0.
Google Test will be used for implementing unit tests. The first set of
unit tests will be for testing RpPng with various PNG image formats.

The Google Test code is currently identical to the release archive,
except for the removal of .travis.yml and appveyor.xml.

CMakeLists.txt: Added CTest support. (see cmake/gtest.cmake)

extlibs/CMakeLists.txt: Only build googletest libraries if testing is
enabled and some project depends on them.
2016-09-02 21:01:52 -04:00