Browse Source

removed few unused lines from cmakes

cl-refactor
Marek Kotewicz 10 years ago
parent
commit
d5b343994a
  1. 51
      cmake/EthCompilerSettings.cmake
  2. 16
      libsolidity/CompilerStack.h

51
cmake/EthCompilerSettings.cmake

@ -1,25 +1,32 @@
# Set necessary compile and link flags
# C++11 check and activation
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wno-unknown-pragmas -Wextra -DSHAREDLIB")
set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wno-unknown-pragmas -Wextra -DSHAREDLIB -fPIC")
set(ETH_SHARED 1)
execute_process(
COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
if (NOT (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7))
message(FATAL_ERROR "${PROJECT_NAME} requires g++ 4.7 or greater.")
endif ()
elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wno-unknown-pragmas -Wextra -DSHAREDLIB")
set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wno-unknown-pragmas -Wextra -DSHAREDLIB -fPIC")
set(ETH_SHARED 1)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# specify Exception Handling Model in msvc
set(CMAKE_CXX_FLAGS "/EHsc")
# windows likes static
set(ETH_STATIC 1)
else ()
message(FATAL_ERROR "Your C++ compiler does not support C++11. You have ${CMAKE_CXX_COMPILER_ID}")
endif ()
# Initialize CXXFLAGS
# CMAKE_CXX_FLAGS was set before
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -DETH_DEBUG")
@ -27,37 +34,3 @@ set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG -DETH_RELEASE")
set(CMAKE_CXX_FLAGS_RELEASE "-O4 -DNDEBUG -DETH_RELEASE")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DETH_DEBUG")
# Windows
#if ("${TARGET_PLATFORM}" STREQUAL "w64")
# set(CMAKE_SYSTEM_NAME Windows)
#
# set(CMAKE_CXX_LIBRARY_ARCHITECTURE x86_64-w64-mingw32)
# set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc)
# set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)
# set(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres)
# set(CMAKE_AR x86_64-w64-mingw32-ar)
# set(CMAKE_RANLIB x86_64-w64-mingw32-ranlib)
#
# set(CMAKE_EXECUTABLE_SUFFIX .exe)
#
# set(CMAKE_FIND_ROOT_PATH
# /usr/x86_64-w64-mingw32
# )
#
# include_directories(/usr/x86_64-w64-mingw32/include/cryptopp)
#
# set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
# set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
#
# set(CMAKE_INSTALL_PREFIX /usr/x86_64-w64-mingw32)
# set(ETH_BUILD_PLATFORM "windows")
# set(ETH_STATIC 1)
#else ()
# set(ETH_BUILD_PLATFORM ${CMAKE_SYSTEM_NAME})
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
# set(ETH_SHARED 1)
#endif()

16
libsolidity/CompilerStack.h

@ -94,22 +94,6 @@ public:
/// scanning the source code - this is useful for printing exception information.
static bytes staticCompile(std::string const& _sourceCode, bool _optimize = false);
/// Compile under msvc results in error CC2280
CompilerStack& operator=(const CompilerStack& _other)
{
m_scanner = _other.m_scanner;
m_globalContext = _other.m_globalContext;
m_contractASTNode = _other.m_contractASTNode;
m_parseSuccessful = _other.m_parseSuccessful;
m_interface.reset(_other.m_interface.get());
m_userDocumentation.reset(_other.m_userDocumentation.get());
m_devDocumentation.reset(_other.m_devDocumentation.get());
m_compiler = _other.m_compiler;
m_interfaceHandler = _other.m_interfaceHandler;
m_bytecode = m_bytecode;
return *this;
}
private:
/**
* Information pertaining to one source unit, filled gradually during parsing and compilation.

Loading…
Cancel
Save