File tree 2 files changed +34
-2
lines changed
2 files changed +34
-2
lines changed Original file line number Diff line number Diff line change 1
1
CMAKE_MINIMUM_REQUIRED ( VERSION 2.8 )
2
+
3
+ PROJECT ( MATH )
4
+
2
5
SET ( CMAKE_COLOR_MAKEFILE ON )
3
6
SET ( CMAKE_VERBOSE_MAKEFILE OFF )
4
7
SET ( CMAKE_INCLUDE_CURRENT_DIR TRUE )
5
8
SET ( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE )
6
9
10
+ SET ( CMAKE_MODULE_PATH
11
+ ${CMAKE_MODULE_PATH}
12
+ "${CMAKE_CURRENT_SOURCE_DIR} /cmake"
13
+ )
14
+
7
15
IF ( NOT CMAKE_BUILD_TYPE )
8
16
SET ( CMAKE_BUILD_TYPE Debug )
9
17
SET ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDEBUG" )
10
18
ENDIF ( )
11
19
12
- PROJECT ( MATH )
13
-
14
20
# Versioning.
15
21
SET ( ${PROJECT_NAME} _MAJOR_VERSION 0 )
16
22
SET ( ${PROJECT_NAME} _MINOR_VERSION 1 )
17
23
SET ( ${PROJECT_NAME} _PATCH_LEVEL 0 )
18
24
19
25
OPTION ( BUILD_TESTS "Set to ON to build test programs" OFF )
20
26
27
+ FIND_PACKAGE ( GMP REQUIRED )
28
+
21
29
ADD_DEFINITIONS ( "-Wall" )
22
30
ADD_SUBDIRECTORY ( src )
23
31
Original file line number Diff line number Diff line change
1
+ # Try to find the GMP libraries
2
+ # GMP_FOUND - system has GMP lib
3
+ # GMP_INCLUDE_DIR - the GMP include directory
4
+ # GMP_LIBRARIES - Libraries needed to use GMP
5
+
6
+ # Copyright (c) 2006, Laurent Montel, <[email protected] >
7
+ #
8
+ # Redistribution and use is allowed according to the terms of the BSD license.
9
+ # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
10
+
11
+ if (GMP_INCLUDE_DIR AND GMP_LIBRARIES)
12
+ # Already in cache, be silent
13
+ set (GMP_FIND_QUIETLY TRUE )
14
+ endif (GMP_INCLUDE_DIR AND GMP_LIBRARIES)
15
+
16
+ find_path (GMP_INCLUDE_DIR NAMES gmp.h )
17
+ find_library (GMP_LIBRARIES NAMES gmp libgmp )
18
+ find_library (GMPXX_LIBRARIES NAMES gmpxx libgmpxx )
19
+ #MESSAGE(STATUS "GMP libs: " ${GMP_LIBRARIES} " " ${GMPXX_LIBRARIES} )
20
+
21
+ include (FindPackageHandleStandardArgs)
22
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(GMP DEFAULT_MSG GMP_INCLUDE_DIR GMP_LIBRARIES)
23
+
24
+ mark_as_advanced (GMP_INCLUDE_DIR GMP_LIBRARIES)
You can’t perform that action at this time.
0 commit comments