UPDATE: modify cmake scripts, adding warning messages.

This commit is contained in:
Hacksign
2025-05-30 12:37:35 +08:00
parent e9a6911019
commit 829e3d95a6
12 changed files with 24 additions and 41 deletions

View File

@@ -27,7 +27,18 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
# MinGW LTO will cause errors in compile stage
# We just disable it
if(CMAKE_C_COMPILER MATCHES "/.*/x86_64-w64-mingw32-gcc$")
if(MINGW)
set(MINGW_WARNING_SHOWED FALSE)
if (NOT ${MINGW_WARNING_SHOWED})
set(MINGW_WARNING_SHOWED TRUE)
message(STATUS "!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!")
message(STATUS "!!! Cross compile with MinGW is not fully tested !!!")
message(STATUS "!!! Compile will continue after 10 seconds !!!")
message(STATUS "!!! <CTRL-C> to stop compile. !!!")
message(STATUS "!!! USE AT YOUR OWN RISK, YOU HAVE BEEN WARNED !!!")
message(STATUS "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 10)
endif()
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION OFF)
elseif(NOT CMAKE_SYSTEM_NAME MATCHES "Emscripten")
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)