Build and link gmp correctly on MSVC
authorSmallJoker <mk939@ymail.com>
Tue, 12 May 2015 18:38:56 +0000 (20:38 +0200)
committerest31 <MTest31@outlook.com>
Tue, 12 May 2015 19:07:46 +0000 (21:07 +0200)
Also optimize json's library

src/gmp/CMakeLists.txt
src/json/CMakeLists.txt

index b8a56543f0f27c24983a9e114f8782773f121473..96ae8191d5b60787b5a7133fb4fcd3af6c3e6beb 100644 (file)
@@ -1,4 +1,7 @@
-add_library(gmp mini-gmp.c)
+if(MSVC)
+       set(CMAKE_C_FLAGS_RELEASE "/MT /O2 /Ob2 /D NDEBUG")
+endif()
 
+add_library(gmp mini-gmp.c)
 target_link_libraries(gmp)
 
index de99c7f0c611c5f9f46d03ee46fd86b109a2cc85..9056e4b6d044ab106fd72abed8787909551bf371 100644 (file)
@@ -1,5 +1,5 @@
 if(MSVC)
-       set(CMAKE_CXX_FLAGS_RELEASE "/MT")
+       set(CMAKE_CXX_FLAGS_RELEASE "/MT /O2 /Ob2 /D NDEBUG")
 endif()
 
 add_library(jsoncpp jsoncpp.cpp)