metis-5.2.1-respect-user-flags.patch 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. diff --git a/conf/gkbuild.cmake b/conf/gkbuild.cmake
  2. index 0e70a8e..d005f84 100644
  3. --- a/conf/gkbuild.cmake
  4. +++ b/conf/gkbuild.cmake
  5. @@ -29,16 +29,7 @@ endif(CYGWIN)
  6. if(CMAKE_COMPILER_IS_GNUCC)
  7. # GCC opts.
  8. set(GK_COPTIONS "${GK_COPTIONS} -std=c99 -fno-strict-aliasing")
  9. -if(VALGRIND)
  10. - set(GK_COPTIONS "${GK_COPTIONS} -march=x86-64 -mtune=generic")
  11. -else()
  12. - set(GK_COPTIONS "${GK_COPTIONS} -march=native")
  13. -endif(VALGRIND)
  14. - if(NOT MINGW)
  15. - set(GK_COPTIONS "${GK_COPTIONS} -fPIC")
  16. - endif(NOT MINGW)
  17. -# GCC warnings.
  18. - set(GK_COPTIONS "${GK_COPTIONS} -Werror -Wall -pedantic -Wno-unused-function -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unknown-pragmas -Wno-unused-label")
  19. +
  20. elseif(${CMAKE_C_COMPILER_ID} MATCHES "Sun")
  21. # Sun insists on -xc99.
  22. set(GK_COPTIONS "${GK_COPTIONS} -xc99")
  23. @@ -65,24 +56,10 @@ if(OPENMP)
  24. endif(OPENMP)
  25. -# Add various definitions.
  26. -if(GDB)
  27. - set(GK_COPTS "${GK_COPTS} -g")
  28. - set(GK_COPTIONS "${GK_COPTIONS} -Werror")
  29. -else()
  30. - set(GK_COPTS "-O3")
  31. -endif(GDB)
  32. -
  33. -
  34. if(DEBUG)
  35. - set(GK_COPTS "-Og")
  36. set(GK_COPTIONS "${GK_COPTIONS} -DDEBUG")
  37. endif(DEBUG)
  38. -if(GPROF)
  39. - set(GK_COPTS "-pg")
  40. -endif(GPROF)
  41. -
  42. if(NOT ASSERT)
  43. set(GK_COPTIONS "${GK_COPTIONS} -DNDEBUG")
  44. endif(NOT ASSERT)