Ver código fonte

Merge pull request #300 from kainjow/osx-mwindows

Fix "argument unused during compilation"
bel2125 9 anos atrás
pai
commit
53c2d1c7e8
1 arquivos alterados com 6 adições e 2 exclusões
  1. 6 2
      CMakeLists.txt

+ 6 - 2
CMakeLists.txt

@@ -278,7 +278,9 @@ if (HAVE_C_FLAG_FSANITIZE_ADDRESS)
   add_c_compiler_flag(-static-asan DEBUG)
 endif()
 add_c_compiler_flag(-fstack-protector-all DEBUG)
-add_c_compiler_flag(-mwindows)
+if (MINGW)
+  add_c_compiler_flag(-mwindows)
+endif()
 
 # Coverage build type
 set(CMAKE_C_FLAGS_COVERAGE "${CMAKE_C_FLAGS_DEBUG}" CACHE STRING
@@ -343,7 +345,9 @@ if (CIVETWEB_ENABLE_CXX)
     add_cxx_compiler_flag(-static-asan DEBUG)
   endif()
   add_cxx_compiler_flag(-fstack-protector-all DEBUG)
-  add_cxx_compiler_flag(-mwindows)
+  if (MINGW)
+    add_cxx_compiler_flag(-mwindows)
+  endif()
   set(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_DEBUG}" CACHE STRING
       "Flags used by the C++ compiler during coverage builds."
       FORCE)