cmake: Cleaned up definitions and default flags a bit
This commit is contained in:
parent
0b191be52a
commit
205b9a4444
2 changed files with 5 additions and 6 deletions
|
@ -21,14 +21,17 @@ set (CMAKE_CXX_FLAGS_DEFAULT "${CMAKE_CXX_FLAGS}")
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
|
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
|
||||||
add_definitions (-D_CRT_SECURE_NO_WARNINGS=1)
|
add_definitions (-D_CRT_SECURE_NO_WARNINGS=1)
|
||||||
|
add_definitions (-DVC_EXTRALEAN)
|
||||||
|
add_definitions (-DWIN32_LEAN_AND_MEAN)
|
||||||
|
add_definitions (-D_WIN32_WINNT=0x600)
|
||||||
else ()
|
else ()
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-no-undefined")
|
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-no-undefined")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -g -std=gnu99 -fvisibility=hidden")
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -std=gnu99 -fvisibility=hidden")
|
||||||
if (CMAKE_CXX_COMPILER_WORKS)
|
if (CMAKE_CXX_COMPILER_WORKS)
|
||||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror -g ${CXX11_FLAG} -fvisibility=hidden")
|
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra ${CXX11_FLAG} -fvisibility=hidden")
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
|
|
@ -25,10 +25,6 @@
|
||||||
# define INTERNAL_H_
|
# define INTERNAL_H_
|
||||||
|
|
||||||
# if defined(_WIN32) && !defined(__CYGWIN__)
|
# if defined(_WIN32) && !defined(__CYGWIN__)
|
||||||
# define VC_EXTRALEAN
|
|
||||||
# define WIN32_LEAN_AND_MEAN
|
|
||||||
# undef _WIN32_WINNT
|
|
||||||
# define _WIN32_WINNT 0x0600
|
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
|
|
||||||
# if defined(MINGW_DEFINE_OFF_T) && (defined(__MINGW32__) || defined(__MINGW64__))
|
# if defined(MINGW_DEFINE_OFF_T) && (defined(__MINGW32__) || defined(__MINGW64__))
|
||||||
|
|
Loading…
Add table
Reference in a new issue