Fixing SSE instability for Mingw32 systems (see issue 1736)
This commit is contained in:
@@ -33,7 +33,16 @@ set (PROC_TARGET_NUMBER 0 CACHE STRING "Selected target processor from the list
|
|||||||
# It were moved away from rtengine/CMakefiles.txt, because some users may want to remove -ffast_math :
|
# It were moved away from rtengine/CMakefiles.txt, because some users may want to remove -ffast_math :
|
||||||
# this flag speeds up the floating-point operations, but with a little bite less precisions. This default value
|
# this flag speeds up the floating-point operations, but with a little bite less precisions. This default value
|
||||||
# gives the same result/behaviour as before.
|
# gives the same result/behaviour as before.
|
||||||
set (RTENGINE_CXX_FLAGS "-ffast-math -funroll-loops" CACHE STRING "Special compilation flags for RTEngine")
|
# Due to a bug in GCC when using OpenMP+SSE, -mstackrealign will be added to your flags
|
||||||
|
set (RTENGINE_CXX_FLAGS "-ffast-math -funroll-loops" CACHE STRING "Special compilation flags for RTEngine; -mstackrealign will be added to your flags")
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||||
|
set (RTENGINE_CXX_FLAGS_MANDATORY "-mstackrealign")
|
||||||
|
elseif (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
set (RTENGINE_CXX_FLAGS_MANDATORY "")
|
||||||
|
endif (CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||||
|
endif (WIN32)
|
||||||
|
|
||||||
#loading the processor targets list
|
#loading the processor targets list
|
||||||
include (ProcessorTargets.cmake)
|
include (ProcessorTargets.cmake)
|
||||||
|
@@ -29,7 +29,7 @@ IF (BUILD_SHARED_LIBS)
|
|||||||
install (TARGETS rtengine DESTINATION ${LIBDIR})
|
install (TARGETS rtengine DESTINATION ${LIBDIR})
|
||||||
ENDIF (BUILD_SHARED_LIBS)
|
ENDIF (BUILD_SHARED_LIBS)
|
||||||
|
|
||||||
set_target_properties (rtengine PROPERTIES COMPILE_FLAGS "${RTENGINE_CXX_FLAGS}")
|
set_target_properties (rtengine PROPERTIES COMPILE_FLAGS "${RTENGINE_CXX_FLAGS} ${RTENGINE_CXX_FLAGS_MANDATORY}")
|
||||||
|
|
||||||
target_link_libraries (rtengine rtexif ${EXTRA_LIB} ${GOBJECT_LIBRARIES} ${GTHREAD_LIBRARIES}
|
target_link_libraries (rtengine rtexif ${EXTRA_LIB} ${GOBJECT_LIBRARIES} ${GTHREAD_LIBRARIES}
|
||||||
${GLIB2_LIBRARIES} ${GLIBMM_LIBRARIES} ${LCMS_LIBRARIES} ${EXPAT_LIBRARIES} ${FFTW3F_LIBRARIES} ${IPTCDATA_LIBRARIES}
|
${GLIB2_LIBRARIES} ${GLIBMM_LIBRARIES} ${LCMS_LIBRARIES} ${EXPAT_LIBRARIES} ${FFTW3F_LIBRARIES} ${IPTCDATA_LIBRARIES}
|
||||||
|
Reference in New Issue
Block a user