diff --git a/cmake/scotch.cmake b/cmake/scotch.cmake index 1863efd..06f6d53 100644 --- a/cmake/scotch.cmake +++ b/cmake/scotch.cmake @@ -1,7 +1,8 @@ set(SCOTCH_NAME scotch) set(SCOTCH_URL ${PROJECT_SOURCE_DIR}/files) -set(SCOTCH_GZ scotch_6.0.4.tar.gz) -set(SCOTCH_MD5 "d58b825eb95e1db77efe8c6ff42d329f") +set(SCOTCH_GZ scotch_6.0.3-cmake.tar.gz) +set(SCOTCH_MD5 "90877bc3a6db6010e3587fe23bdac758") + find_program(FLEX flex) if (NOT FLEX) @@ -9,46 +10,20 @@ if (NOT FLEX) "'flex' lexical parser not found. Cannot build scotch." ) endif() -if (APPLE) - set(SCOTCH_MAKE Makefile.inc.i686_mac_darwin10) - set(SCOTCH_CFLAGS "-Drestrict=__restrict -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DCOMMON_TIMING_OLD -DSCOTCH_PTHREAD -DSCOTCH_RENAME -DCOMMON_PTHREAD_BARRIER -I${ZLIB_INCLUDE_DIR}") - set(SCOTCH_LDFLAGS "-Wl,-rpath,${CMAKE_INSTALL_PREFIX}/lib ${ZLIB_LIBRARIES} -lm -lpthread") -else () - if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") - set(SCOTCH_MAKE Makefile.inc.x86-64_pc_linux2) - set(SCOTCH_CFLAGS "-DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD -Drestrict=__restrict -DIDXSIZE64 -I${ZLIB_INCLUDE_DIR}") - else () - set(SCOTCH_MAKE Makefile.inc.i686_pc_linux2) - set(SCOTCH_CFLAGS "-DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD -Drestrict=__restrict -I${ZLIB_INCLUDE_DIR}") - endif () - set(SCOTCH_LDFLAGS "-Wl,-rpath,${CMAKE_INSTALL_PREFIX}/lib ${ZLIB_LIBRARIES} -lm -lrt -lpthread") -endif () - ExternalProject_Add( ${SCOTCH_NAME} DEPENDS ${ZLIB_PACKAGE_NAME} URL ${SCOTCH_URL}/${SCOTCH_GZ} URL_MD5 ${SCOTCH_MD5} UPDATE_COMMAND "" - - BUILD_IN_SOURCE 1 - - CONFIGURE_COMMAND rm -f src/Makefile.inc - - COMMAND ln -s Make.inc/${SCOTCH_MAKE} - src/Makefile.inc - - BUILD_COMMAND - $(MAKE) -C src - "CCS=${CMAKE_C_COMPILER}" - "CCD=${CMAKE_C_COMPILER}" - "CFLAGS=${CMAKE_C_FLAGS} ${SCOTCH_CFLAGS}" - "LDFLAGS=${SCOTCH_LDFLAGS}" - "CLIBFLAGS=-fPIC" - scotch - INSTALL_COMMAND - $(MAKE) -C src - "MKDIR=mkdir -p" - prefix=${CMAKE_INSTALL_PREFIX} - install + CMAKE_ARGS + -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} + -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER} + -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS} + -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} + -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS} + -DUSE_BZ2:BOOL=OFF + -DBUILD_PTSCOTCH:BOOL=OFF + -DZLIB_INCLUDE_DIR:PATH=${ZLIB_INCLUDE_DIR} + -DZLIB_LIBRARIES:FILEPATH=${ZLIB_LIBRARIES} ) diff --git a/files/scotch_6.0.3-cmake.tar.gz b/files/scotch_6.0.3-cmake.tar.gz new file mode 100644 index 0000000..e52ba0a Binary files /dev/null and b/files/scotch_6.0.3-cmake.tar.gz differ diff --git a/files/scotch_6.0.4.tar.gz b/files/scotch_6.0.4.tar.gz deleted file mode 100644 index 63e8e62..0000000 Binary files a/files/scotch_6.0.4.tar.gz and /dev/null differ