Move compiler flags configuration to a new file (config/compilerFlags.cmake).
Also define the PSAPI_VERSION only for the exiv2lib target (It's not needed for the rest of targets)v0.27.3
parent
6175aa4f3f
commit
a2bb29011d
@ -0,0 +1,18 @@
|
|||||||
|
if ( MINGW OR UNIX ) # MINGW, Linux, APPLE, CYGWIN
|
||||||
|
if (${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
|
||||||
|
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -Wall
|
||||||
|
-Wcast-align
|
||||||
|
-Wpointer-arith
|
||||||
|
-Wformat-security
|
||||||
|
-Wmissing-format-attribute
|
||||||
|
-Woverloaded-virtual
|
||||||
|
-W
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if ( CYGWIN OR (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.0))
|
||||||
|
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -std=gnu++98 ) # to support snprintf
|
||||||
|
else()
|
||||||
|
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -std=c++98 )
|
||||||
|
endif()
|
||||||
|
endif ()
|
Loading…
Reference in New Issue