aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaweł Bylica <chfast@gmail.com>2017-08-18 19:31:31 +0800
committerPaweł Bylica <chfast@gmail.com>2017-08-18 19:32:35 +0800
commitd1f4d110fb5c2ed09ef0111ecd3789f52be1200c (patch)
treea583a23950da8c300cdf3b012019cf96c1e20120
parent2a1b6b2e92edc1665eb1644f2ccf06c44e68448a (diff)
downloaddexon-solidity-d1f4d110fb5c2ed09ef0111ecd3789f52be1200c.tar.gz
dexon-solidity-d1f4d110fb5c2ed09ef0111ecd3789f52be1200c.tar.zst
dexon-solidity-d1f4d110fb5c2ed09ef0111ecd3789f52be1200c.zip
CMake: Build static libs by default
-rw-r--r--cmake/EthCompilerSettings.cmake20
-rw-r--r--cmake/EthDependencies.cmake2
-rw-r--r--libevmasm/CMakeLists.txt2
-rw-r--r--liblll/CMakeLists.txt2
-rw-r--r--libsolidity/CMakeLists.txt2
-rw-r--r--test/CMakeLists.txt2
6 files changed, 1 insertions, 29 deletions
diff --git a/cmake/EthCompilerSettings.cmake b/cmake/EthCompilerSettings.cmake
index 4ce9d22d..9b294e27 100644
--- a/cmake/EthCompilerSettings.cmake
+++ b/cmake/EthCompilerSettings.cmake
@@ -63,13 +63,6 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
# Applying -fpermissive to a C command-line (ie. secp256k1) gives a build error.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
- # Build everything as shared libraries (.so files)
- add_definitions(-DSHAREDLIB)
-
- # If supported for the target machine, emit position-independent code, suitable for dynamic
- # linking and avoiding any limit on the size of the global offset table.
- add_compile_options(-fPIC)
-
# Configuration-specific compiler settings.
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -DETH_DEBUG")
set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG")
@@ -198,7 +191,6 @@ elseif (DEFINED MSVC)
add_compile_options(/wd4800) # disable forcing value to bool 'true' or 'false' (performance warning) (4800)
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
- add_compile_options(-DMINIUPNP_STATICLIB) # define miniupnp static library
# Always use Release variant of C++ runtime.
# We don't want to provide Debug variants of all dependencies. Some default
@@ -218,12 +210,6 @@ elseif (DEFINED MSVC)
# stack size 16MB
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ignore:4099,4075 /STACK:16777216")
- # windows likes static
- if (NOT ETH_STATIC)
- message("Forcing static linkage for MSVC.")
- set(ETH_STATIC 1)
- endif ()
-
# If you don't have GCC, Clang or VC++ then you are on your own. Good luck!
else ()
message(WARNING "Your compiler is not tested, if you run into any issues, we'd welcome any patches.")
@@ -262,9 +248,3 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
endif ()
endif ()
endif ()
-
-if(ETH_STATIC)
- set(BUILD_SHARED_LIBS OFF)
-else()
- set(BUILD_SHARED_LIBS ON)
-endif(ETH_STATIC)
diff --git a/cmake/EthDependencies.cmake b/cmake/EthDependencies.cmake
index a5e9b0c5..7d2a7675 100644
--- a/cmake/EthDependencies.cmake
+++ b/cmake/EthDependencies.cmake
@@ -94,8 +94,6 @@ if (STATIC_LINKING)
else()
set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
endif()
-
- set(ETH_STATIC ON)
endif()
find_package(Boost 1.54.0 QUIET REQUIRED COMPONENTS thread date_time system regex chrono filesystem unit_test_framework program_options random)
diff --git a/libevmasm/CMakeLists.txt b/libevmasm/CMakeLists.txt
index 9cc3e93e..9c7efb86 100644
--- a/libevmasm/CMakeLists.txt
+++ b/libevmasm/CMakeLists.txt
@@ -1,5 +1,3 @@
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB")
-
aux_source_directory(. SRC_LIST)
set(EXECUTABLE solevmasm)
diff --git a/liblll/CMakeLists.txt b/liblll/CMakeLists.txt
index db90025a..4246e481 100644
--- a/liblll/CMakeLists.txt
+++ b/liblll/CMakeLists.txt
@@ -1,8 +1,6 @@
cmake_policy(SET CMP0015 NEW)
set(CMAKE_AUTOMOC OFF)
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB")
-
aux_source_directory(. SRC_LIST)
set(EXECUTABLE lll)
diff --git a/libsolidity/CMakeLists.txt b/libsolidity/CMakeLists.txt
index 2342f0f9..e6398507 100644
--- a/libsolidity/CMakeLists.txt
+++ b/libsolidity/CMakeLists.txt
@@ -1,5 +1,3 @@
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB")
-
aux_source_directory(analysis SRC_LIST)
aux_source_directory(ast SRC_LIST)
aux_source_directory(codegen SRC_LIST)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 8e7b8916..6b114239 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -20,7 +20,7 @@ eth_simple_add_executable(${EXECUTABLE} ${SRC_LIST} ${HEADERS})
eth_use(${EXECUTABLE} REQUIRED Solidity::solidity Solidity::lll)
include_directories(BEFORE ..)
-target_link_libraries(${EXECUTABLE} soljson ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES})
+target_link_libraries(${EXECUTABLE} soljson devcore ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES})
add_executable(solfuzzer fuzzer.cpp)
target_link_libraries(solfuzzer soljson ${Boost_PROGRAM_OPTIONS_LIBRARIES})