Skip to content

Commit

Permalink
fixed compiler error with GMP PR
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunharker committed Dec 23, 2016
1 parent 358700e commit 03d7ca9
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 14 deletions.
24 changes: 24 additions & 0 deletions .install/cmake/Modules/FindGMP.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Try to find the GMP librairies
# GMP_FOUND - system has GMP lib
# GMP_INCLUDE_DIR - the GMP include directory
# GMP_LIBRARIES - Libraries needed to use GMP

# Copyright (c) 2006, Laurent Montel, <montel@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.

if (GMP_INCLUDE_DIR AND GMP_LIBRARIES)
# Already in cache, be silent
set(GMP_FIND_QUIETLY TRUE)
endif (GMP_INCLUDE_DIR AND GMP_LIBRARIES)

find_path(GMP_INCLUDE_DIR NAMES gmp.h )
find_library(GMP_LIBRARIES NAMES gmp libgmp )
find_library(GMPXX_LIBRARIES NAMES gmpxx libgmpxx )
MESSAGE(STATUS "GMP libs: " ${GMP_LIBRARIES} " " ${GMPXX_LIBRARIES} )

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GMP DEFAULT_MSG GMP_INCLUDE_DIR GMP_LIBRARIES)

mark_as_advanced(GMP_INCLUDE_DIR GMP_LIBRARIES)
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ addons:
packages:
- gcc-4.8
- g++-4.8
- libgmp-dev
# - clang
notifications:
email:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib"
if("${isSystemDir}" STREQUAL "-1")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
endif("${isSystemDir}" STREQUAL "-1")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/.install/cmake/Modules)

#########
# Flags #
Expand Down
12 changes: 0 additions & 12 deletions cmake-modules/FindGMP.cmake

This file was deleted.

2 changes: 1 addition & 1 deletion include/chomp/Ring.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class GMP_Integer {
mpz_class x;
public:
GMP_Integer ( void ) : x ( 0 ) {}
GMP_Integer ( int64_t x ) : x(x) {}
GMP_Integer ( int32_t x ) : x(x) {} // GMP does not allow conversions from 64-bit types here, strangely
GMP_Integer ( const mpz_class& x) : x(x) {}

bool invertible ( void ) const {
Expand Down

0 comments on commit 03d7ca9

Please sign in to comment.