aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Parpart <christian@parpart.family>2018-07-11 03:37:58 +0800
committerGitHub <noreply@github.com>2018-07-11 03:37:58 +0800
commit49cc1b855464d428f022267b5997dfc093ea1b44 (patch)
treebb5b9aa4624f0c590e1b8a7df4e837b60bfe79b7
parent12045d2e110348950c81963adcd1a6fe6b42143f (diff)
parent230317e9ff97ba3b110a95bd22c2656b42fc70b6 (diff)
downloaddexon-solidity-49cc1b855464d428f022267b5997dfc093ea1b44.tar.gz
dexon-solidity-49cc1b855464d428f022267b5997dfc093ea1b44.tar.zst
dexon-solidity-49cc1b855464d428f022267b5997dfc093ea1b44.zip
Merge pull request #4470 from ethereum/vs2017-build-fix-ideal
Visual Studio 2017 build-time (linking) fix and improvements
-rw-r--r--.gitignore3
-rw-r--r--cmake/EthCompilerSettings.cmake11
-rw-r--r--cmake/jsoncpp.cmake4
3 files changed, 4 insertions, 14 deletions
diff --git a/.gitignore b/.gitignore
index 14c227d0..87a3e593 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,6 +35,7 @@ build/
docs/_build
docs/utils/__pycache__
docs/utils/*.pyc
+/deps/downloads/
# vim stuff
*.swp
@@ -43,3 +44,5 @@ docs/utils/*.pyc
.idea
browse.VC.db
CMakeLists.txt.user
+/CMakeSettings.json
+/.vs
diff --git a/cmake/EthCompilerSettings.cmake b/cmake/EthCompilerSettings.cmake
index 683d1d2e..3ae5bf2a 100644
--- a/cmake/EthCompilerSettings.cmake
+++ b/cmake/EthCompilerSettings.cmake
@@ -132,17 +132,6 @@ elseif (DEFINED MSVC)
add_compile_options(-D_WIN32_WINNT=0x0600) # declare Windows Vista API requirement
add_compile_options(-DNOMINMAX) # undefine windows.h MAX && MIN macros cause it cause conflicts with std::min && std::max functions
- # Always use Release variant of C++ runtime.
- # We don't want to provide Debug variants of all dependencies. Some default
- # flags set by CMake must be tweaked.
- string(REPLACE "/MDd" "/MD" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
- string(REPLACE "/D_DEBUG" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
- string(REPLACE "/RTC1" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
- string(REPLACE "/MDd" "/MD" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
- string(REPLACE "/D_DEBUG" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
- string(REPLACE "/RTC1" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
- set_property(GLOBAL PROPERTY DEBUG_CONFIGURATIONS OFF)
-
# disable empty object file warning
set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /ignore:4221")
# warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/SAFESEH' specification
diff --git a/cmake/jsoncpp.cmake b/cmake/jsoncpp.cmake
index 0c110b53..e886c609 100644
--- a/cmake/jsoncpp.cmake
+++ b/cmake/jsoncpp.cmake
@@ -35,9 +35,7 @@ ExternalProject_Add(jsoncpp-project
-DJSONCPP_WITH_TESTS=OFF
-DJSONCPP_WITH_PKGCONFIG_SUPPORT=OFF
-DCMAKE_CXX_FLAGS=${JSONCPP_EXTRA_FLAGS}
- # Overwrite build and install commands to force Release build on MSVC.
- BUILD_COMMAND cmake --build <BINARY_DIR> --config Release
- INSTALL_COMMAND cmake --build <BINARY_DIR> --config Release --target install
+ -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
${byproducts}
)