Browse Source

An attempt to silence the Wreorder warning on OSX build server
Clang apparently cares about order of command line arguments, so -Wall should come before -Wno-whatever

Lukas Matena 5 years ago
parent
commit
0a5f8aa2e8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      CMakeLists.txt

+ 1 - 1
CMakeLists.txt

@@ -163,7 +163,7 @@ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUXX)
 endif()
 
 if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
-    add_compile_options(-Wall)
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall" )
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-reorder" )
 
     # On GCC and Clang, no return from a non-void function is a warning only. Here, we make it an error.