Browse Source

fixed #1590, msvc build with cmake 3.2.1

cl-refactor
debris 10 years ago
parent
commit
7f2ac99679
  1. 17
      CMakeLists.txt
  2. 8
      test/CMakeLists.txt

17
CMakeLists.txt

@ -1,10 +1,22 @@
# cmake global # cmake global
cmake_minimum_required(VERSION 2.8.12) cmake_minimum_required(VERSION 2.8.12)
project(ethereum)
set(CMAKE_AUTOMOC ON)
# link_directories interprate relative paths with respect to CMAKE_CURRENT_SOURCE_DIR
cmake_policy(SET CMP0015 NEW)
# let cmake autolink dependencies on windows # let cmake autolink dependencies on windows
# it's specified globally, cause qt libraries requires that on windows and they are also found globally # it's specified globally, cause qt libraries requires that on windows and they are also found globally
cmake_policy(SET CMP0020 NEW) cmake_policy(SET CMP0020 NEW)
project(ethereum) # 3.1 and above
if ((${CMAKE_MAJOR_VERSION} GREATER 2) AND (${CMAKE_MINOR_VERSION} GREATER 0))
# implicitly dereference variables (deprecated in 3.1)
cmake_policy(SET CMP0054 OLD)
endif()
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
@ -118,9 +130,6 @@ endfunction()
###################################################################################################### ######################################################################################################
set(CMAKE_AUTOMOC ON)
cmake_policy(SET CMP0015 NEW)
# Clear invalid option # Clear invalid option
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release") if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
if (PARANOID) if (PARANOID)

8
test/CMakeLists.txt

@ -34,10 +34,10 @@ endforeach(file)
file(GLOB HEADERS "*.h") file(GLOB HEADERS "*.h")
add_executable(testeth ${SRC_LIST} ${HEADERS}) add_executable(testeth ${SRC_LIST} ${HEADERS})
add_executable(createRandomVMTest createRandomVMTest.cpp vm.cpp TestHelper.cpp Stats.cpp) add_executable(createRandomVMTest "./createRandomVMTest.cpp" "./vm.cpp" "./TestHelper.cpp" "./Stats.cpp")
add_executable(createRandomStateTest createRandomStateTest.cpp TestHelper.cpp Stats.cpp) add_executable(createRandomStateTest "./createRandomStateTest.cpp" "./TestHelper.cpp" "./Stats.cpp")
add_executable(checkRandomVMTest checkRandomVMTest.cpp vm.cpp TestHelper.cpp Stats.cpp) add_executable(checkRandomVMTest "./checkRandomVMTest.cpp" "./vm.cpp" "./TestHelper.cpp" "./Stats.cpp")
add_executable(checkRandomStateTest checkRandomStateTest.cpp TestHelper.cpp Stats.cpp) add_executable(checkRandomStateTest "./checkRandomStateTest.cpp" "./TestHelper.cpp" "./Stats.cpp")
target_link_libraries(testeth ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES}) target_link_libraries(testeth ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES})
target_link_libraries(testeth ${CURL_LIBRARIES}) target_link_libraries(testeth ${CURL_LIBRARIES})

Loading…
Cancel
Save