-
Notifications
You must be signed in to change notification settings - Fork 282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix c++11 0.27 #1194
Fix c++11 0.27 #1194
Changes from 4 commits
759ce9f
d994161
4da0a57
63a13e8
cd5c3e4
e0f65f7
65dde52
c423b91
3ebfee1
b22d1de
7928c63
0a06dc9
4060298
da91f04
f1182b8
9b3f47f
f775676
cd9ee99
9b6b403
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -195,7 +195,7 @@ $ | |
#### geotag | ||
|
||
``` | ||
Usage: geotag {-help|-version|-dst|-dryrun|-ascii|-verbose|-adjust value|-tz value|-delta value}+ path+ | ||
Usage: geotag {-help|-version|-dst|-dryrun|-ascii|-remove|-verbose|-adjust value|-tz value|-delta value}+ path+ | ||
``` | ||
|
||
Geotag reads one or more GPX files and adds GPS Tages to images. _Code: [geotag.cpp](samples/geotag.cpp)_ | ||
|
@@ -208,6 +208,7 @@ If the path is a directory, geotag will read all the files in the directory. It | |
| -dst | Apply 1 hour adjustment for daylight saving time. | | ||
| -dryrun | Read arguments and print report. Does not modify images. | | ||
| -verbose | Report progress. | | ||
| -remove | Removes GPS tags from images. | | ||
| -adjust value | Add/subtract time from image data. | | ||
| -tz value | Specify time zone. For example PST = -8:00 | | ||
| -delta value | Correction between Image DataTime and GPS time. | | ||
|
@@ -643,4 +644,4 @@ Read an XMP packet from a file, parse and re-serialize it. | |
|
||
Robin Mills<br> | ||
[email protected]<br> | ||
Revised: 2019-06-20 | ||
Revised: 2020-05-01 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
# These flags applies to exiv2lib, the applications, and to the xmp code | ||
|
||
if ( EXIV2_BUILD_USE_C++11 ) | ||
set(CMAKE_CXX_STANDARD 11) | ||
endif() | ||
|
||
if ( MINGW OR UNIX OR MSYS ) # MINGW, Linux, APPLE, CYGWIN | ||
if (${CMAKE_CXX_COMPILER_ID} STREQUAL GNU) | ||
set(COMPILER_IS_GCC ON) | ||
|
@@ -22,10 +26,6 @@ if ( MINGW OR UNIX OR MSYS ) # MINGW, Linux, APPLE, CYGWIN | |
|
||
|
||
if (COMPILER_IS_GCC OR COMPILER_IS_CLANG) | ||
# On Solaris target_compile_features(${application} PRIVATE cxx_std_98) fails to set this flag | ||
if ( CMAKE_HOST_SOLARIS ) | ||
add_compile_options(-std=gnu++98) | ||
endif() | ||
|
||
# This fails under Fedora, MinGW GCC 8.3.0 and CYGWIN/MSYS 9.3.0 | ||
if (NOT (MINGW OR CMAKE_HOST_SOLARIS OR CYGWIN OR MSYS) ) | ||
|
@@ -58,7 +58,6 @@ if ( MINGW OR UNIX OR MSYS ) # MINGW, Linux, APPLE, CYGWIN | |
# This seems to be causing issues in the Fedora_MinGW GitLab job | ||
#add_compile_options(-fasynchronous-unwind-tables) | ||
|
||
|
||
if ( EXIV2_TEAM_USE_SANITIZERS ) | ||
# ASAN is available in gcc from 4.8 and UBSAN from 4.9 | ||
# ASAN is available in clang from 3.1 and UBSAN from 3.3 | ||
|
@@ -90,6 +89,10 @@ if ( MINGW OR UNIX OR MSYS ) # MINGW, Linux, APPLE, CYGWIN | |
endif() | ||
endif() | ||
endif() | ||
if ( EXIV2_BUILD_USE_C++11 ) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please, replace the usage of
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've removed that 100%. I don't mess with the compile_options for |
||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated") | ||
endif() | ||
endif () | ||
|
||
# http://stackoverflow.com/questions/10113017/setting-the-msvc-runtime-in-cmake | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,5 +93,15 @@ typedef int pid_t; | |
#endif | ||
////////////////////////////////////// | ||
|
||
// https://softwareengineering.stackexchange.com/questions/291141/how-to-handle-design-changes-for-auto-ptr-deprecation-in-c11 | ||
#if __cplusplus >= 201103L | ||
#include <memory> | ||
#include <sys/types.h> | ||
#include <unistd.h> | ||
template <typename T> | ||
using auto_ptr = std::unique_ptr<T>; | ||
#else | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a clever trick, I did not think about that. I think you can remove lines 103 & 104 from here. We do not need the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can't remember what |
||
using std::auto_ptr; | ||
#endif | ||
|
||
#endif // _CONFIG_H_ |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,10 +91,6 @@ generate_export_header(exiv2lib | |
STATIC_DEFINE exiv2lib_STATIC | ||
) | ||
|
||
target_compile_features(exiv2lib_int PRIVATE cxx_std_98) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are some other usages of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've got rid of all the |
||
target_compile_features(exiv2lib PRIVATE cxx_std_98) | ||
|
||
|
||
# Conditional addition of sources to library targets | ||
# --------------------------------------------------------- | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we wound need to following. Replace these lines by:
And more important is to remove all the usages of: