X-Git-Url: https://vaikene.ee/gitweb/pswgen09.html?a=blobdiff_plain;ds=inline;f=CMakeWin.txt;h=95a950035199fc4e77238e5991929cc34c0bdc39;hb=13dedf19c628b9967e4c4106ab0fd967f1df0b90;hp=6e43b9a281c7ac6150de2993f117d177095023dd;hpb=441d1b38e0900f56891f495a94a08dc8d48e0a32;p=evaf
diff --git a/CMakeWin.txt b/CMakeWin.txt
index 6e43b9a..95a9500 100644
--- a/CMakeWin.txt
+++ b/CMakeWin.txt
@@ -1,3 +1,18 @@
# Extra rules for Windows builds
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:wchar_t-")
+if(MINGW)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
+
+ # gcc options for release and debug builds
+ IF(CMAKE_BUILD_TYPE STREQUAL Release)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
+ ELSE(CMAKE_BUILD_TYPE STREQUAL Release)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
+ ENDIF(CMAKE_BUILD_TYPE STREQUAL Release)
+
+ set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined")
+
+else(MINGW)
+ # Assume a Microsoft Visual C++ compiler
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:wchar_t-")
+endif(MINGW)