diff --git a/CMakeLists.txt b/CMakeLists.txt index 478e1a2fcb6f94e2d28fe85671ccdee769f5f673..435773d7bcf9b7064062d3e0f5486e003182b55c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,6 +57,7 @@ if(UNIX) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -m64") endif() # C compiler flags + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffp-contract=off") # disable floating point operation contraction set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wcast-qual -Wall -W -Wextra -Wno-long-long") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror-implicit-function-declaration -Wno-unused-parameter") diff --git a/Makefile b/Makefile index 8955e04e665a5468618937419cf2118978436d21..811d38b6842ef13dfb82ad5a81a74102e014f7af 100644 --- a/Makefile +++ b/Makefile @@ -58,7 +58,7 @@ endif CFLAGS += -std=c99 -pedantic -Wcast-qual -Wall -W -Wextra -Wno-long-long \ -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ -Werror-implicit-function-declaration \ - -Wno-implicit-fallthrough + -Wno-implicit-fallthrough -ffp-contract=off # libs to link LDLIBS += -lm