geom_gate userland utility improvements
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

24 lines
800 B

  1. if(MSVC)
  2. # Use the highest warning level for visual studio.
  3. if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
  4. string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
  5. else()
  6. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
  7. endif()
  8. if(CMAKE_C_FLAGS MATCHES "/W[0-4]")
  9. string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
  10. else()
  11. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4")
  12. endif()
  13. # Disable broken warnings
  14. add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE)
  15. elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
  16. if(NOT CMAKE_CXX_FLAGS MATCHES "-Wall")
  17. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
  18. endif()
  19. if(NOT CMAKE_C_FLAGS MATCHES "-Wall")
  20. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
  21. endif()
  22. endif()