MINGW cross compiler fixes
This commit is contained in:
parent
c1faae3d62
commit
2cca5662f4
@ -105,9 +105,6 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
|||||||
-Winvalid-pch -Woverloaded-virtual
|
-Winvalid-pch -Woverloaded-virtual
|
||||||
-Wconversion -Wswitch-enum
|
-Wconversion -Wswitch-enum
|
||||||
-Wno-ctor-dtor-privacy -Wno-format-nonliteral -Wno-shadow)
|
-Wno-ctor-dtor-privacy -Wno-format-nonliteral -Wno-shadow)
|
||||||
if (MINGW)
|
|
||||||
target_compile_options("-Wa,-mbig-obj")
|
|
||||||
endif ()
|
|
||||||
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6)
|
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6)
|
||||||
set(PEDANTIC_COMPILE_FLAGS ${PEDANTIC_COMPILE_FLAGS} -Wnoexcept
|
set(PEDANTIC_COMPILE_FLAGS ${PEDANTIC_COMPILE_FLAGS} -Wnoexcept
|
||||||
-Wno-dangling-else -Wno-unused-local-typedefs)
|
-Wno-dangling-else -Wno-unused-local-typedefs)
|
||||||
@ -194,6 +191,11 @@ if (HAVE_STRTOD_L)
|
|||||||
target_compile_definitions(fmt PUBLIC FMT_LOCALE)
|
target_compile_definitions(fmt PUBLIC FMT_LOCALE)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
if (MINGW)
|
||||||
|
target_compile_options(fmt PRIVATE "-Wa,-mbig-obj")
|
||||||
|
# target_compile_options(fmt PRIVATE "-g")
|
||||||
|
endif ()
|
||||||
|
|
||||||
if (FMT_WERROR)
|
if (FMT_WERROR)
|
||||||
target_compile_options(fmt PRIVATE ${WERROR_FLAG})
|
target_compile_options(fmt PRIVATE ${WERROR_FLAG})
|
||||||
endif ()
|
endif ()
|
||||||
|
|||||||
@ -66,6 +66,7 @@ endif ()
|
|||||||
function(add_fmt_executable name)
|
function(add_fmt_executable name)
|
||||||
add_executable(${name} ${ARGN})
|
add_executable(${name} ${ARGN})
|
||||||
if (MINGW)
|
if (MINGW)
|
||||||
|
target_compile_options(${name} PRIVATE "-Wa,-mbig-obj")
|
||||||
target_link_libraries(${name} -static-libgcc -static-libstdc++)
|
target_link_libraries(${name} -static-libgcc -static-libstdc++)
|
||||||
endif ()
|
endif ()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user