aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-04-17 16:50:03 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-04-23 20:37:37 +0800
commitfa2a28abc2484390a97c83af58646e4327673e96 (patch)
tree8e05d4feae3fbb1389911af6561681f41f62c51e /cmake
parenta49dac8057f3e48984585aed4f7c7f8050d25471 (diff)
downloaddexon-solidity-fa2a28abc2484390a97c83af58646e4327673e96.tar
dexon-solidity-fa2a28abc2484390a97c83af58646e4327673e96.tar.gz
dexon-solidity-fa2a28abc2484390a97c83af58646e4327673e96.tar.bz2
dexon-solidity-fa2a28abc2484390a97c83af58646e4327673e96.tar.lz
dexon-solidity-fa2a28abc2484390a97c83af58646e4327673e96.tar.xz
dexon-solidity-fa2a28abc2484390a97c83af58646e4327673e96.tar.zst
dexon-solidity-fa2a28abc2484390a97c83af58646e4327673e96.zip
CMake: enable C++11 for jsoncpp
Diffstat (limited to 'cmake')
-rw-r--r--cmake/jsoncpp.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmake/jsoncpp.cmake b/cmake/jsoncpp.cmake
index 7a9d7e40..3d6b37ed 100644
--- a/cmake/jsoncpp.cmake
+++ b/cmake/jsoncpp.cmake
@@ -11,6 +11,10 @@ set(prefix "${CMAKE_BINARY_DIR}/deps")
set(JSONCPP_LIBRARY "${prefix}/${CMAKE_INSTALL_LIBDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}jsoncpp${CMAKE_STATIC_LIBRARY_SUFFIX}")
set(JSONCPP_INCLUDE_DIR "${prefix}/include")
+if(NOT MSVC)
+ set(JSONCPP_EXTRA_FLAGS "-std=c++11")
+endif()
+
set(byproducts "")
if(CMAKE_VERSION VERSION_GREATER 3.1)
set(byproducts BUILD_BYPRODUCTS "${JSONCPP_LIBRARY}")
@@ -30,7 +34,7 @@ ExternalProject_Add(jsoncpp-project
-DCMAKE_POSITION_INDEPENDENT_CODE=${BUILD_SHARED_LIBS}
-DJSONCPP_WITH_TESTS=OFF
-DJSONCPP_WITH_PKGCONFIG_SUPPORT=OFF
- -DCMAKE_CXX_FLAGS=${JSONCCP_EXTRA_FLAGS}
+ -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