On Wed, May 21, 2014 at 1:35 PM, Imran Ali
<[email protected]> wrote:
> On 2014-05-20 15:16, Johannes Ring wrote:
>>
>> On Tue, May 20, 2014 at 2:55 PM, Imran Ali
>> <[email protected]> wrote:
>>>
>>> I commented out the following in the cmake file :
>>>
>>> ## Try to figure out PETSC_DIR by finding petsc.h
>>> #find_path(PETSC_DIR include/petsc.h
>>> #  HINTS ${PETSC_DIR} $ENV{PETSC_DIR}
>>> #  PATHS ${petsc_dir_locations}
>>> #  DOC "PETSc directory")
>>> message("Skipped find petsc")
>>> # Report result of search for PETSC_DIR
>>> if (DEFINED PETSC_DIR)
>>>   message(STATUS "PETSC_DIR is ${PETSC_DIR}")
>>> else()
>>>   message(STATUS "PETSC_DIR is empty")
>>> endif()
>>>
>>>
>>> And the build went successfully, however without being able to find
>>> PETSc.
>>> Which I need.
>>
>>
>> I was thinking more of disabling some of the try_run calls in
>> FindPETSc.cmake. However, you can also try to turn off
>> DOLFIN_SKIP_BUILD_TESTS and then apply the following patch to
>> FindPETSc.cmake:
>>
>>    # Build PETSc test program
>>   -if (DOLFIN_SKIP_BUILD_TESTS)
>>   +if (1)
>>      set(PETSC_TEST_RUNS TRUE)
>>   -  set(PETSC_VERSION "UNKNOWN")
>>   +  set(PETSC_VERSION "3.4.4")
>>      set(PETSC_VERSION_OK TRUE)
>>    elseif (FOUND_PETSC_CONF)
>>
>> Change the version number according to your PETSc version.
>>
>> Johannes
>
>
> I added this in the PETSc cmake file (along with skip build in dolfin
> script), however the build would crash with the following message
>
> CMake Error at CMakeLists.txt:335 (if):
>   if given arguments:
>
>     "NOT" "(" "3" "EQUAL" "AND" "4" "EQUAL" ")"
>
>   Unknown arguments specified

Haven't we already been through this?

http://fenicsproject.org/pipermail/fenics-support/2014-May/000552.html

Johannes

>
> Using the if test if (DOLFIN_SKIP_BUILD_TESTS) instead of if(1), would
> result in no error. However, then the dolfin build would not find PETSc :
>
> -- Found petscconf.h
> -- Performing test PETSC_TEST_RUNS - Failed
> -- Performing test PETSC_TEST_3RD_PARTY_LIBS_RUNS - Failed
> -- Performing Test PETSC_CUSP_FOUND
> -- Performing Test PETSC_CUSP_FOUND - Failed
> -- PETSc configured without Cusp support
> -- PETSc could not be found. Be sure to set PETSC_DIR and PETSC_ARCH.
> (missing:  PETSC_TEST_RUNS) (Required is at least version "3.2")
>
> And the build would continue without PETSc.
>
> Imran
_______________________________________________
fenics-support mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics-support

Reply via email to