CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

CMake PETSc External libraries

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 2, 2014, 11:13
Default CMake PETSc External libraries
  #1
Member
 
Paul Zhang
Join Date: Feb 2011
Posts: 44
Rep Power: 15
paulzhang is on a distinguished road
Does anyone know how to configure CMakeLists.txt to call some external libraries other than PETSc? I got one, which only works with PETSc itself though.

Thanks,
Paul

CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

set(PETSC_DIR /home/hzh225/LIB_CFD/nP/petsc-3.5.2)
set(PETSC_ARCH linux-gnu-intel)

SET(CMAKE_MODULE_PATH "./cmake-modules-master")
FIND_PACKAGE(PETSc REQUIRED)


INCLUDE_DIRECTORIES(${PETSC_INCLUDES})
ADD_DEFINITIONS(${PETSC_DEFINITIONS})

ADD_EXECUTABLE(kats main.cc)

TARGET_LINK_LIBRARIES(kats ${PETSC_LIBRARIES})
paulzhang is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[swak4Foam] difficulties installing swak4foam newbie29 OpenFOAM Community Contributions 120 October 21, 2022 05:01
CGNS Compiling Diego Main CFD Forum 17 December 21, 2014 02:40
PETSc from Cmake d_dante Main CFD Forum 1 January 12, 2011 08:50
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found piprus OpenFOAM Installation 22 February 25, 2010 14:43
OpenFOAM15 paraFoam bug koen OpenFOAM Bugs 19 June 30, 2009 11:46


All times are GMT -4. The time now is 03:48.