aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorChristian Parpart <christian@ethereum.org>2018-12-20 00:28:05 +0800
committerchriseth <chris@ethereum.org>2018-12-20 16:02:00 +0800
commit639622c6d7b3c449252962cc16cf5274e4fcbafc (patch)
tree1858056b127634ec51a309a5f129a8d5f7772f17 /cmake
parentb5548280388f769d291d4007dd456805a6e4d339 (diff)
downloaddexon-solidity-639622c6d7b3c449252962cc16cf5274e4fcbafc.tar.gz
dexon-solidity-639622c6d7b3c449252962cc16cf5274e4fcbafc.tar.zst
dexon-solidity-639622c6d7b3c449252962cc16cf5274e4fcbafc.zip
cmake: Do not depend on a C compiler to be present by explicitly stating that this is a C++ project.
CMake defaults to C *and* C++ toolchain, in case nothing has been specified. This means that cmake always checks for both, which is more than needed. This PR cuts off C toolchain requirement from /CMakeLists.txt and ensures that we don't pass along any `..._C_...` variables in EthCompilerSettings.cake nor jsoncpp.cmake.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/EthCompilerSettings.cmake3
-rw-r--r--cmake/jsoncpp.cmake1
2 files changed, 1 insertions, 3 deletions
diff --git a/cmake/EthCompilerSettings.cmake b/cmake/EthCompilerSettings.cmake
index 70505fdb..b5cfd09d 100644
--- a/cmake/EthCompilerSettings.cmake
+++ b/cmake/EthCompilerSettings.cmake
@@ -166,9 +166,8 @@ option(USE_CVC4 "Allow compiling with CVC4 SMT solver integration" ON)
if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))
option(USE_LD_GOLD "Use GNU gold linker" ON)
if (USE_LD_GOLD)
- execute_process(COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
+ execute_process(COMMAND ${CMAKE_CXX_COMPILER} -fuse-ld=gold -Wl,--version ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
if ("${LD_VERSION}" MATCHES "GNU gold")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fuse-ld=gold")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=gold")
endif ()
endif ()
diff --git a/cmake/jsoncpp.cmake b/cmake/jsoncpp.cmake
index 4db7b9c3..4ca8581d 100644
--- a/cmake/jsoncpp.cmake
+++ b/cmake/jsoncpp.cmake
@@ -35,7 +35,6 @@ ExternalProject_Add(jsoncpp-project
URL_HASH SHA256=c49deac9e0933bcb7044f08516861a2d560988540b23de2ac1ad443b219afdb6
CMAKE_COMMAND ${JSONCPP_CMAKE_COMMAND}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
- -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_INSTALL_LIBDIR=lib
# Build static lib but suitable to be included in a shared lib.