Browse Source

Merge pull request #628 from debris/windows_debug

Windows 32 debug, part 1
cl-refactor
Gav Wood 10 years ago
parent
commit
f8c4d0b5d9
  1. 1
      alethzero/CMakeLists.txt
  2. 2
      cmake/FindGmp.cmake
  3. 2
      cmake/FindJsonRpcCpp.cmake
  4. 139
      cmake/FindJsoncpp.cmake
  5. 16
      cmake/FindLevelDB.cmake
  6. 2
      cmake/FindMiniupnpc.cmake
  7. 2
      cmake/FindReadline.cmake
  8. 5
      eth/CMakeLists.txt
  9. 8
      libdevcore/CMakeLists.txt
  10. 2
      libdevcrypto/CMakeLists.txt
  11. 2
      libethereum/CMakeLists.txt
  12. 4
      solc/CMakeLists.txt
  13. 4
      test/CMakeLists.txt

1
alethzero/CMakeLists.txt

@ -32,7 +32,6 @@ eth_add_executable(${EXECUTABLE}
add_dependencies(${EXECUTABLE} BuildInfo.h)
target_link_libraries(${EXECUTABLE} Qt5::Core)
target_link_libraries(${EXECUTABLE} ${JSONCPP_LIBRARIES})
target_link_libraries(${EXECUTABLE} webthree)
target_link_libraries(${EXECUTABLE} qethereum)
target_link_libraries(${EXECUTABLE} ethereum)

2
cmake/FindGmp.cmake

@ -2,7 +2,7 @@
#
# Find the gmp includes and library
#
# if you nee to add a custom library search path, do it via via CMAKE_FIND_ROOT_PATH
# if you nee to add a custom library search path, do it via via CMAKE_PREFIX_PATH
#
# This module defines
# GMP_INCLUDE_DIRS, where to find header, etc.

2
cmake/FindJsonRpcCpp.cmake

@ -2,7 +2,7 @@
#
# Find the json-rpc-cpp includes and library
#
# if you nee to add a custom library search path, do it via via CMAKE_FIND_ROOT_PATH
# if you nee to add a custom library search path, do it via via CMAKE_PREFIX_PATH
#
# This module defines
# JSON_RCP_CPP_INCLUDE_DIRS, where to find header, etc.

139
cmake/FindJsoncpp.cmake

@ -1,103 +1,48 @@
# - try to find JSONCPP library
# Find jsoncpp
#
# Cache Variables: (probably not for direct use in your scripts)
# JSONCPP_INCLUDE_DIR
# JSONCPP_LIBRARY
#
# Non-cache variables you might use in your CMakeLists.txt:
# JSONCPP_FOUND
# JSONCPP_INCLUDE_DIRS
# JSONCPP_LIBRARIES
#
# Requires these CMake modules:
# FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
#
# Author:
# 2011 Philippe Crassous (ENSAM ParisTech / Institut Image) p.crassous _at_ free.fr
#
# Adapted from the Virtual Reality Peripheral Network library.
# https://github.com/rpavlik/vrpn/blob/master/README.Legal
#
set(JSONCPP_ROOT_DIR
"${JSONCPP_ROOT_DIR}"
CACHE
PATH
"Directory to search for JSONCPP")
set(_jsoncppnames)
set(_pathsuffixes
suncc
vacpp
mingw
msvc6
msvc7
msvc71
msvc80
msvc90
linux-gcc)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
execute_process(COMMAND
${CMAKE_CXX_COMPILER}
-dumpversion
OUTPUT_VARIABLE
_gnucxx_ver
OUTPUT_STRIP_TRAILING_WHITESPACE)
list(APPEND
_jsoncppnames
json_linux-gcc-${_gnucxx_ver}_libmt
json_linux-gcc_libmt)
list(APPEND _pathsuffixes linux-gcc-${_gnucxx_ver})
elseif(MSVC)
if(MSVC_VERSION EQUAL 1200)
list(APPEND _jsoncppnames json_vc6_libmt)
elseif(MSVC_VERSION EQUAL 1300)
list(APPEND _jsoncppnames json_vc7_libmt)
elseif(MSVC_VERSION EQUAL 1310)
list(APPEND _jsoncppnames json_vc71_libmt)
elseif(MSVC_VERSION EQUAL 1400)
list(APPEND _jsoncppnames json_vc8_libmt)
elseif(MSVC_VERSION EQUAL 1500)
list(APPEND _jsoncppnames json_vc9_libmt)
elseif(MSVC_VERSION EQUAL 1600)
list(APPEND _jsoncppnames json_vc10_libmt)
endif()
else()
list(APPEND _jsoncppnames
json_suncc_libmt
json_vacpp_libmt)
endif()
list(APPEND _jsoncppnames
json_mingw_libmt
jsoncpp)
find_library(JSONCPP_LIBRARY
NAMES
${_jsoncppnames}
PATHS
"${JSONCPP_ROOT_DIR}/libs"
PATH_SUFFIXES
${_pathsuffixes})
find_path(JSONCPP_INCLUDE_DIR
NAMES
json/json.h
PATHS
"${JSONCPP_ROOT_DIR}"
PATH_SUFFIXES jsoncpp
include)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(JSONCPP
DEFAULT_MSG
# Find the jsoncpp includes and library
#
# if you nee to add a custom library search path, do it via via CMAKE_PREFIX_PATH
#
# This module defines
# JSONCPP_INCLUDE_DIRS, where to find header, etc.
# JSONCPP_LIBRARIES, the libraries needed to use jsoncpp.
# JSONCPP_FOUND, If false, do not try to use jsoncpp.
# only look in default directories
find_path(
JSONCPP_INCLUDE_DIR
NAMES jsoncpp/json/json.h
DOC "jsoncpp include dir"
)
find_library(
JSONCPP_LIBRARY
JSONCPP_INCLUDE_DIR)
NAMES jsoncpp
DOC "jsoncpp library"
)
set(JSONCPP_INCLUDE_DIRS ${JSONCPP_INCLUDE_DIR})
set(JSONCPP_LIBRARIES ${JSONCPP_LIBRARY})
# debug library on windows
# same naming convention as in qt (appending debug library with d)
# boost is using the same "hack" as us with "optimized" and "debug"
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
find_library(
JSONCPP_LIBRARY_DEBUG
NAMES jsoncppd
DOC "jsoncpp debug library"
)
set(JSONCPP_LIBRARIES optimized ${JSONCPP_LIBRARIES} debug ${JSONCPP_LIBRARY_DEBUG})
if(JSONCPP_FOUND)
set(JSONCPP_LIBRARIES "${JSONCPP_LIBRARY}")
set(JSONCPP_INCLUDE_DIRS "${JSONCPP_INCLUDE_DIR}")
mark_as_advanced(JSONCPP_ROOT_DIR)
endif()
mark_as_advanced(JSONCPP_INCLUDE_DIR JSONCPP_LIBRARY)
# handle the QUIETLY and REQUIRED arguments and set JSONCPP_FOUND to TRUE
# if all listed variables are TRUE, hide their existence from configuration view
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(jsoncpp DEFAULT_MSG
JSONCPP_INCLUDE_DIR JSONCPP_LIBRARY)
mark_as_advanced (JSONCPP_INCLUDE_DIR JSONCPP_LIBRARY)

16
cmake/FindLevelDB.cmake

@ -2,7 +2,7 @@
#
# Find the leveldb includes and library
#
# if you nee to add a custom library search path, do it via via CMAKE_FIND_ROOT_PATH
# if you nee to add a custom library search path, do it via via CMAKE_PREFIX_PATH
#
# This module defines
# LEVELDB_INCLUDE_DIRS, where to find header, etc.
@ -25,6 +25,20 @@ find_library(
set(LEVELDB_INCLUDE_DIRS ${LEVELDB_INCLUDE_DIR})
set(LEVELDB_LIBRARIES ${LEVELDB_LIBRARY})
# debug library on windows
# same naming convention as in qt (appending debug library with d)
# boost is using the same "hack" as us with "optimized" and "debug"
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
find_library(
LEVELDB_LIBRARY_DEBUG
NAMES leveldbd
DOC "leveldb debug library"
)
set(LEVELDB_LIBRARIES optimized ${LEVELDB_LIBRARIES} debug ${LEVELDB_LIBRARY_DEBUG})
endif()
# handle the QUIETLY and REQUIRED arguments and set LEVELDB_FOUND to TRUE
# if all listed variables are TRUE, hide their existence from configuration view
include(FindPackageHandleStandardArgs)

2
cmake/FindMiniupnpc.cmake

@ -2,7 +2,7 @@
#
# Find the miniupnpc includes and library
#
# if you nee to add a custom library search path, do it via via CMAKE_FIND_ROOT_PATH
# if you nee to add a custom library search path, do it via via CMAKE_PREFIX_PATH
#
# This module defines
# MINIUPNPC_INCLUDE_DIRS, where to find header, etc.

2
cmake/FindReadline.cmake

@ -2,7 +2,7 @@
#
# Find the readline includes and library
#
# if you nee to add a custom library search path, do it via via CMAKE_FIND_ROOT_PATH
# if you nee to add a custom library search path, do it via via CMAKE_PREFIX_PATH
#
# This module defines
# READLINE_INCLUDE_DIRS, where to find header, etc.

5
eth/CMakeLists.txt

@ -3,6 +3,7 @@ set(CMAKE_AUTOMOC OFF)
aux_source_directory(. SRC_LIST)
include_directories(${Boost_INCLUDE_DIRS})
include_directories(${JSON_RPC_CPP_INCLUDE_DIRS})
include_directories(..)
@ -14,8 +15,8 @@ add_executable(${EXECUTABLE} ${SRC_LIST} ${HEADERS})
add_dependencies(${EXECUTABLE} BuildInfo.h)
target_link_libraries(${EXECUTABLE} ${Boost_REGEX_LIBRARY_RELEASE})
target_link_libraries(${EXECUTABLE} ${Boost_DATE_TIME_LIBRARY_RELEASE})
target_link_libraries(${EXECUTABLE} ${Boost_REGEX_LIBRARIES})
target_link_libraries(${EXECUTABLE} ${Boost_DATE_TIME_LIBRARIES})
if (READLINE_FOUND)
target_link_libraries(${EXECUTABLE} ${READLINE_LIBRARIES})

8
libdevcore/CMakeLists.txt

@ -25,10 +25,10 @@ else()
add_library(${EXECUTABLE} SHARED ${SRC_LIST} ${HEADERS})
endif()
target_link_libraries(${EXECUTABLE} ${Boost_THREAD_LIBRARY_RELEASE})
target_link_libraries(${EXECUTABLE} ${Boost_DATE_TIME_LIBRARY_RELEASE})
target_link_libraries(${EXECUTABLE} ${Boost_SYSTEM_LIBRARY_RELEASE})
target_link_libraries(${EXECUTABLE} ${Boost_CHRONO_LIBRARY_RELEASE})
target_link_libraries(${EXECUTABLE} ${Boost_THREAD_LIBRARIES})
target_link_libraries(${EXECUTABLE} ${Boost_DATE_TIME_LIBRARIES})
target_link_libraries(${EXECUTABLE} ${Boost_SYSTEM_LIBRARIES})
target_link_libraries(${EXECUTABLE} ${Boost_CHRONO_LIBRARIES})
if (APPLE)
find_package(Threads REQUIRED)

2
libdevcrypto/CMakeLists.txt

@ -23,7 +23,7 @@ else()
add_library(${EXECUTABLE} SHARED ${SRC_LIST} ${HEADERS})
endif()
target_link_libraries(${EXECUTABLE} ${Boost_FILESYSTEM_LIBRARY_RELEASE})
target_link_libraries(${EXECUTABLE} ${Boost_FILESYSTEM_LIBRARIES})
target_link_libraries(${EXECUTABLE} ${LEVELDB_LIBRARIES})
target_link_libraries(${EXECUTABLE} ${CRYPTOPP_LIBRARIES})
target_link_libraries(${EXECUTABLE} devcore)

2
libethereum/CMakeLists.txt

@ -25,7 +25,7 @@ else()
endif()
target_link_libraries(${EXECUTABLE} ${LEVELDB_LIBRARIES})
target_link_libraries(${EXECUTABLE} ${Boost_REGEX_LIBRARY_RELEASE})
target_link_libraries(${EXECUTABLE} ${Boost_REGEX_LIBRARIES})
target_link_libraries(${EXECUTABLE} evm)
target_link_libraries(${EXECUTABLE} lll)

4
solc/CMakeLists.txt

@ -11,8 +11,8 @@ set(EXECUTABLE solc)
file(GLOB HEADERS "*.h")
add_executable(${EXECUTABLE} ${SRC_LIST} ${HEADERS})
target_link_libraries(${EXECUTABLE} ${Boost_FILESYSTEM_LIBRARY_RELEASE})
target_link_libraries(${EXECUTABLE} ${Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE})
target_link_libraries(${EXECUTABLE} ${Boost_FILESYSTEM_LIBRARIES})
target_link_libraries(${EXECUTABLE} ${Boost_PROGRAM_OPTIONS_LIBRARIES})
target_link_libraries(${EXECUTABLE} solidity)
install( TARGETS ${EXECUTABLE} DESTINATION bin )

4
test/CMakeLists.txt

@ -12,7 +12,7 @@ file(GLOB HEADERS "*.h")
add_executable(testeth ${SRC_LIST} ${HEADERS})
add_executable(createRandomTest createRandomTest.cpp vm.cpp TestHelper.cpp)
target_link_libraries(testeth ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY_RELEASE})
target_link_libraries(testeth ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES})
target_link_libraries(testeth ${CURL_LIBRARIES})
target_link_libraries(testeth ethereum)
target_link_libraries(testeth ethcore)
@ -25,6 +25,6 @@ if (JSONRPC)
target_link_libraries(testeth ${JSON_RPC_CPP_CLIENT_LIBRARIES})
endif()
target_link_libraries(createRandomTest ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY_RELEASE})
target_link_libraries(createRandomTest ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES})
target_link_libraries(createRandomTest ethereum)
target_link_libraries(createRandomTest ethcore)

Loading…
Cancel
Save