Commit Graph

54 Commits

Author SHA1 Message Date
Luis Díaz Más
fdfb295cc4 windows: Trick to get UTF-8 encoded argv in main entry point
- Adapt exifprint to the new wmain strategy
- Delete have_unicode_path
- wmain does not work with MSYS & MinGW
- cmake: entry point via cmake instead of pragma
- cmake: better doc for MSVC flags
- Fix entry point in sample apps
- Adapt CMake code to work with MSVC & MinGW
2022-02-13 22:49:32 +01:00
Luis Díaz Más
b0318c36be
Upgrade C++ standard to c++17 (#2052)
* Enable C++17 and use new inline specifier for const variable members

* Silence deprecation warning on MSVC

* Disable samples by default

* improvements after review
2022-01-09 20:09:34 +01:00
Luis Díaz Más
ad948e84f1 cmake: default c++ standard => 14 2022-01-07 09:38:42 +01:00
Kevin Backhouse
cf6566b13c
Fix indentation 2021-10-15 16:53:53 +01:00
Kevin Backhouse
d2bdf6868f
Revert "Fix for https://github.com/Exiv2/exiv2/issues/1856"
This reverts commit e667346582.
2021-10-14 10:40:21 +01:00
Evan Miller
7700f90786
Pass -fstack-protector-strong to linker
Fixes some older compiler / platform combinations (e.g. GCC7 on PPC Mac)
2021-09-19 13:01:55 -04:00
Kevin Backhouse
5bfa568b63
Add OSS-Fuzz status badge and CIFuzz integration. 2021-08-17 17:47:17 +01:00
Kevin Backhouse
cee9015ff8
Add special build mode for OSS-Fuzz. 2021-08-15 13:34:41 +01:00
Kevin Backhouse
64fe77673f
Decouple EXIV2_BUILD_FUZZ_TESTS from EXIV2_TEAM_USE_SANITIZERS. 2021-08-11 15:11:01 +01:00
Kevin Backhouse
ee3016c240
Merge pull request #1813 from kevinbackhouse/FuzzWithASAN
Add sanitizer flags when fuzzing
2021-08-08 11:58:52 +01:00
Kevin Backhouse
b6f9a3747f
Add sanitizer flags when fuzzing. 2021-08-08 11:18:56 +01:00
Kevin Backhouse
e667346582
Fix for https://github.com/Exiv2/exiv2/issues/1856 2021-08-07 16:59:19 +01:00
Kevin Backhouse
bf786f4cc6
Updates to make fuzzing work. 2021-07-11 21:14:08 +01:00
Fabrice Fontaine
f31c0eba09 add BUILD_WITH_STACK_PROTECTOR option
Add BUILD_WITH_STACK_PROTECTOR to avoid the following build failure with
toolchains that don't support stack-protector:

/home/buildroot/autobuild/instance-3/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mipsel-buildroot-linux-uclibc/9.3.0/../../../../mipsel-buildroot-linux-uclibc/bin/ld: utils.cpp:(.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag[_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag]+0xd0): undefined reference to `__stack_chk_fail'

Indeed, support for -fstack-protector-strong can't be detected through
check_cxx_compiler_flag as some toolchains need to link with -lssp to
enable SSP support

Fixes:
 - http://autobuild.buildroot.org/results/ae4635899124c602c70d2b342a76f95c34aa4a3d

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2021-07-01 19:44:40 +02:00
Robin Mills
fd2ab89de5 exifprint_lint 2021-06-23 14:24:46 +01:00
Luis Díaz Más
08672dbea3 make win debug builds a bit faster 2021-05-17 07:31:45 +02:00
Luis Díaz Más
6c0059b5a0 cmake: Treat xmpsdk headers as system ones
This is done so that when we use EXIV2_TEAM_EXTRA_WARNINGS we do not get
warnings about XMPSDK (we do not want to deal with those)
2021-04-18 18:49:58 +02:00
Robin Mills
33d38dc472 Fix Cygwin64 to use -std=gnu++11 (instead of -std=c++11). MinGW/msys2 remains broken on CI. It's OK on my machine. 2021-04-18 09:44:51 +02:00
Luis Díaz Más
0bbaa6eff3 cpp: Replace auto_ptr by unique_ptr 2021-04-15 06:56:11 +02:00
Miloš Komarčević
8d06265470 Fix MinGW build for Ninja generator 2021-01-14 15:44:26 +01:00
Luis Díaz Más
30773c92a3 WIN32_LEAN_AND_MEAN propagated with exiv2lib target 2020-10-06 22:48:38 +02:00
Robin Mills
a82bcebaab fix_cygwin_stack_protection_0.27 2020-10-01 18:50:36 +01:00
Luis Diaz Mas
bfd0e0593b Use check_cxx_compiler_flags instead of C version 2020-09-16 11:53:11 +02:00
Robin Mills
0005edf2f9 fix_solaris_stack_protection_0.27 2020-09-09 17:23:02 +01:00
Thomas Petazzoni
bbe0b70840
Properly detect availability of flags in cmake/compilerFlags.cmake (#1252)
Instead of relying on fragile and complex logic to decide if a
compiler flag is available or not, use the check_c_compiler_flag()
macro provided by the CMake standard library.

This for example avoids using -fcf-protection on architectures that
don't support this option.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

(cherry picked from commit dd2d181755a6e642c0a8e3225ef5407fff49eb3a)

When resolving the conflict from applying the patch, I also took the liberty
of re-indenting the snippet correcly and fixing mismatching
HAS_FCF_PROTECTION and HAS_FSTACK_PROTECTOR_STRONG variables
(the conditionals used GCC_ prefix but the variables were definded without it).

Signed-off-by: Jan Tojnar <jtojnar@gmail.com>
2020-09-04 06:45:00 +02:00
Luis Díaz Más
6667e13c4b Only use __cplusplus trick from VS2017 2020-05-05 08:09:45 +02:00
clanmills
4511817028 MSVC Changes. Leave CMake to set /std:. Only set /Zc:__cplusplus for VS2019+. Updated README.md 2020-05-04 21:43:59 +01:00
Robin Mills
cd5512e761 WIP. C++11 support 2020-05-04 08:17:37 +01:00
clanmills
b22d1de8b1 Remove add_compile_options(-std=gnu++98) 2020-05-02 15:11:30 +01:00
clanmills
65dde52cf9 Updated documentation. Removed -DEXIV2_BUILD_USE_C++11 2020-05-02 14:22:44 +01:00
clanmills
63a13e8620 Adding option -DEXIV2_BUILD_USE_C++11 2020-05-02 12:21:21 +01:00
Robin Mills
c51a8aa8ed Explicitly set compiler option -std=gnu++98 on Solaris 2020-04-30 14:13:23 +01:00
clanmills
5f36bf46e8 Fix for issue identified in #1175 2020-04-24 15:38:50 +01:00
clanmills
b50d6503bc fix_1102_msysGCC93_0.27 2020-04-23 12:11:43 +01:00
clanmills
13565be3d2 Change for solaris. 2020-04-15 16:53:03 +01:00
Robin Mills
d3444d4547 fix_GCC48 2020-03-26 13:21:38 +00:00
Luis Diaz
a62e35edb6 Remove compiler flag which is causing issues in Fedora_MinGW 2019-10-09 12:37:38 +02:00
Luis Diaz
907a5aef3b clang guard for -fstack-protector-strong 2019-10-09 12:37:38 +02:00
Luis Díaz Más
9a0889c744 FORTIFY not used on OSX 2019-10-09 12:37:38 +02:00
Luis Díaz Más
006dcde403 Better usage of --coverage flags 2019-10-09 12:37:38 +02:00
Luis Díaz Más
9c7c3c6d22 Allow to use new compiler flags in clang 2019-10-09 12:37:38 +02:00
Luis Díaz Más
1fa5839c8e cmake: use add_compile_option & add new security flags
- Replacement of CMAKE_CXX_FLAGS by add_compile_option where it was
  possible
- Addition of new compiler flags which are interesting in terms of
  software security
- Do not mix coverage flags with -O0 and -g
2019-10-09 12:37:38 +02:00
Robin Mills
c32b413f74 Fix: https://github.com/Exiv2/exiv2/issues/575 2018-12-09 18:54:40 +01:00
Luis Díaz Más
f92030d650 CMake: remove XMPSRC variable. 2018-11-26 15:23:30 +01:00
Luis Diaz Mas
d6c6d469a9 CMake: Use add_definitions instead of add_compile_definitions 2018-11-16 12:10:11 +01:00
Luis Díaz Más
38ed6de05d MSVC: Move compile definitions from config.h to CMake.
+ Also remove inclusion of <Windows.h> from config.h
2018-11-11 12:27:26 +01:00
Luis Díaz Más
274ef04f7e CMake: Proper way to require c++98 standard 2018-11-08 17:26:02 +01:00
Robin Mills
42084f2563 Add support for MinGW/msys2 in 32 bits + Updates in buildserver 2018-10-26 17:47:15 +02:00
Luis Díaz Más
dc086d2ebb Default to /MD(d) even for STATIC builds.
We had issues to compile exiv2 due to a undefined symbol referenced in expat.lib (Explained in #487).
Static builds in Windows need to use msvcrt.lib where the missing symbol ("__imp__mbspbrk") was
defined. We can still decide to use the STATIC CRT  library by using:

cmake -DBUILD_SHARED_LIBS=OFF -DEXIV2_ENABLE_DYNAMIC_RUNTIME=OFF
2018-10-17 13:05:23 +02:00
Luis Díaz Más
a6d82633c3 Enable WARNINGS_AS_ERRORS in CI jobs.
- Move the settings to other cmake file. This will not be used for XMP code
- Disable WARNINGS_AS_ERRORS for VS2008 and VS2010
2018-09-12 19:22:31 +02:00