Skip to content

Commit

Permalink
Merge branch 'cmake-gmp' into dynamic-smt-switch
Browse files Browse the repository at this point in the history
  • Loading branch information
CyanoKobalamyne committed Aug 19, 2024
2 parents fac839a + 1af8f54 commit def2c79
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)

add_definitions(-DPONO_SRC_DIR=${PROJECT_SOURCE_DIR})

Expand Down Expand Up @@ -71,9 +72,6 @@ message("-- FOUND FLEX INCLUDE DIRS: ${FLEX_INCLUDE_DIRS}")

set(SMT_SWITCH_DIR "${PROJECT_SOURCE_DIR}/deps/smt-switch")

# rely on cmake modules from smt-switch (required anyway)
set(CMAKE_MODULE_PATH ${SMT_SWITCH_DIR}/cmake)

find_package(GMP REQUIRED)

# Check that dependencies are there
Expand Down
19 changes: 19 additions & 0 deletions cmake/FindGMP.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Find GMP
# GMP_FOUND - system has GMP lib
# GMP_INCLUDE_DIR - the GMP include directory
# GMP_LIBRARIES - Libraries needed to use GMP

find_path(GMP_INCLUDE_DIR NAMES gmp.h gmpxx.h)
find_library(GMP_LIBRARIES NAMES gmp)
find_library(GMPXX_LIBRARIES NAMES gmpxx)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GMP DEFAULT_MSG GMP_INCLUDE_DIR GMP_LIBRARIES)

mark_as_advanced(GMP_INCLUDE_DIR GMP_LIBRARIES)
if(GMP_LIBRARIES)
message(STATUS "Found GMP libs: ${GMP_LIBRARIES}")
endif()
if (GMPXX_LIBRARIES)
message(STATUS "Found GMPXX libs: ${GMPXX_LIBRARIES}")
endif()

0 comments on commit def2c79

Please sign in to comment.