issue warning when WITH_RAYOPTIMIZATION is used with MinGW-w32, since this is known to give crashes.
This commit is contained in:
@@ -931,20 +931,26 @@ elseif(WIN32)
|
|||||||
# include(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake)
|
# include(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake)
|
||||||
|
|
||||||
if(CMAKE_COMPILER_IS_GNUCC)
|
if(CMAKE_COMPILER_IS_GNUCC)
|
||||||
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw32)
|
|
||||||
include(CheckCSourceCompiles)
|
include(CheckCSourceCompiles)
|
||||||
# Setup 64bit and 64bit windows systems
|
# Setup 64bit and 64bit windows systems
|
||||||
CHECK_C_SOURCE_COMPILES("
|
CHECK_C_SOURCE_COMPILES("
|
||||||
#ifndef __MINGW64__
|
#ifndef __MINGW64__
|
||||||
#error
|
#error
|
||||||
#endif
|
#endif
|
||||||
main(){}
|
int main(void) { return 0; }
|
||||||
"
|
"
|
||||||
WITH_MINGW64)
|
WITH_MINGW64)
|
||||||
|
|
||||||
if(WITH_MINGW64)
|
if(WITH_MINGW64)
|
||||||
message(STATUS "Compiling for 64 bit with MinGW-w64.")
|
message(STATUS "Compiling for 64 bit with MinGW-w64.")
|
||||||
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw64)
|
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw64)
|
||||||
|
else()
|
||||||
|
message(STATUS "Compiling for 32 bit with MinGW-w32.")
|
||||||
|
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw32)
|
||||||
|
|
||||||
|
if(WITH_RAYOPTIMIZATION)
|
||||||
|
message(WARNING "MinGW-w32 is known to be unstable with 'WITH_RAYOPTIMIZATION' option enabled.")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
# Setup 64bit and 64bit windows systems
|
# Setup 64bit and 64bit windows systems
|
||||||
|
Reference in New Issue
Block a user