Commit 27ed6e6d authored by David Moxey's avatar David Moxey

Fix up a few paths and CMake options

parent 645975d9
Pipeline #624 failed with stage
in 0 seconds
......@@ -33,7 +33,7 @@ IF(OCE_FOUND AND OCE_ALL_FOUND)
ELSE(OCE_FOUND AND OCE_ALL_FOUND) #look for OpenCASCADE
MESSAGE(STATUS "OpenCASCADE Community Edition could not be found or has missing components.")
SET(OpenCASCADE_FIND_COMPONENTS ${OCE_FIND_COMPONENTS})
FIND_PACKAGE(OpenCASCADE 6.8 QUIET HINTS /opt/local)
FIND_PACKAGE(OpenCASCADE)
IF(OpenCASCADE_FOUND)
MESSAGE(STATUS "OpenCASCADE has been found with all required components.")
......
......@@ -5,15 +5,15 @@
# Star CCM i/o
#
########################################################################
OPTION(NEKTAR_USE_CCM
"use CCM star i/o" OFF)
OPTION(NEKTAR_USE_CCM "Use CCMIO library for binary Star-CCM+ in NekMesh" OFF)
IF(NEKTAR_USE_CCM)
# First search for system ccmioL installs. Hint /usr/local
FIND_PATH (CCMIO_INCLUDE_DIR ccmio.h PATHS ${CCM_DIR}/include PATH_SUFFIXES libccmio)
FIND_LIBRARY(CCMIO_LIBRARY NAMES "ccmio" PATHS ${CCM_DIR}/lib PATH_SUFFIXES lib)
FIND_LIBRARY(CCMIO_ADF_LIBRARY NAMES "adf" PATHS ${CCM_DIR}/lib PATH_SUFFIXES lib)
FIND_PATH (CCMIO_INCLUDE_DIR libccmio/ccmio.h PATHS ${CCM_DIR}/include)
FIND_LIBRARY(CCMIO_LIBRARY NAMES "ccmio" PATHS ${CCM_DIR} PATH_SUFFIXES lib)
FIND_LIBRARY(CCMIO_ADF_LIBRARY NAMES "adf" PATHS ${CCM_DIR} PATH_SUFFIXES lib)
# If we have our library then don't build CCMIO.
IF (CCMIO_INCLUDE_DIR AND CCMIO_LIBRARY AND CCMIO_ADF_LIBRARY)
......@@ -22,60 +22,44 @@ ELSE()
SET(BUILD_CCMIO ON)
ENDIF ()
OPTION(THIRDPARTY_BUILD_CCMIO
"Build CCMIO library from ThirdParty if permitted." ${BUILD_CCMIO})
OPTION(THIRDPARTY_BUILD_CCMIO "Build CCMIO library from ThirdParty." ${BUILD_CCMIO})
IF (THIRDPARTY_BUILD_CCMIO)
INCLUDE(ExternalProject)
MESSAGE(WARNING "We are seeking permission to distribute ccmio with Nektar++. If you are entitled to use libccmio please contact nektar-users@imperial.ac.uk and place the file ccmio-2.06.tar.bz2 in the director $NEKTAR/ThirdParty")
EXTERNALPROJECT_ADD(
ccmio-2.06
libccmio-2.6.1
PREFIX ${TPSRC}
URL ${TPURL}/ccmio-2.06.tar.bz2
URL_MD5 809ee34a983cbc8931ca23879d92b4d0
URL http://portal.nersc.gov/svn/visit/trunk/third_party/libccmio-2.6.1.tar.gz
URL_MD5 f81fbdfb960b1a4f3bcc7feee491efe4
STAMP_DIR ${TPBUILD}/stamp
DOWNLOAD_DIR ${TPSRC}
SOURCE_DIR ${TPSRC}/ccmio-2.06
BINARY_DIR ${TPBUILD}/ccmio-2.06
TMP_DIR ${TPBUILD}/ccmio-2.06-tmp
SOURCE_DIR ${TPSRC}/libccmio-2.6.1
BINARY_DIR ${TPBUILD}/libccmio-2.6.1
TMP_DIR ${TPBUILD}/libccmio-2.6.1-tmp
PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/cmake/thirdparty-patches/CMakeLists_CCM.txt ${TPSRC}/libccmio-2.6.1/CMakeLists.txt
INSTALL_DIR ${TPDIST}
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-G ${CMAKE_GENERATOR}
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
-DCMAKE_INSTALL_PREFIX:PATH=${TPDIST}
${TPSRC}/ccmio-2.06
)
SET(CCMIO_LIBRARY ccmio CACHE FILEPATH
"CCMIO library" FORCE)
SET(CCMIO_INCLUDE_DIR ${TPDIST}/include CACHE FILEPATH
"CCMIO include" FORCE)
LINK_DIRECTORIES(${TPDIST}/lib)
INCLUDE_DIRECTORIES(NekMesh ${CCMIO_INCLUDE_DIR})
${TPSRC}/libccmio-2.6.1
)
IF (WIN32)
MESSAGE(STATUS
"Build CCMIO: ${TPDIST}/${LIB_DIR}/${CCMIO_LIBRARY}.dll")
ELSE ()
MESSAGE(STATUS
"Build CCMIO: ${TPDIST}/${LIB_DIR}/lib${CCMIO_LIBRARY}.a")
ENDIF ()
THIRDPARTY_LIBRARY(
CCMIO_LIBRARY STATIC ccmio DESCRIPTION "CCMIO library")
THIRDPARTY_LIBRARY(
CCMIO_ADF_LIBRARY STATIC adf DESCRIPTION "CCMIO ADF library")
INCLUDE_DIRECTORIES(NekMesh ${TPDIST}/include)
MESSAGE(STATUS "Build CCMIO: ${CCMIO_LIBRARY}")
SET(CCMIO_CONFIG_INCLUDE_DIR ${TPINC})
set(CCMIO_LIBRARIES
ccmio
adf
)
ELSE()
ADD_CUSTOM_TARGET(ccmio-2.06 ALL)
ADD_CUSTOM_TARGET(libccmio-2.6.1 ALL)
MESSAGE(STATUS "Found CCMIO: ${CCMIO_LIBRARY}")
SET(CCMIO_CONFIG_INCLUDE_DIR ${CCMIO_INCLUDE_DIR})
INCLUDE_DIRECTORIES(NekMesh ${CCMIO_INCLUDE_DIR})
LINK_DIRECTORIES(${CCMIO_LIBRARY_DIR})
ENDIF (THIRDPARTY_BUILD_CCMIO)
SET(CCMIO_LIBRARIES ${CCMIO_LIBRARY} ${CCMIO_ADF_LIBRARY})
......
Subproject commit 994712df8d948671beefa50a404fb7235521387f
Subproject commit 0724faa50ed893acb7ca256b1582d288396bb5d4
......@@ -57,6 +57,7 @@ ADD_UTILITIES_EXECUTABLE(NekMesh COMPONENT nekmesh
IF (NEKTAR_USE_CCM)
TARGET_LINK_LIBRARIES(NekMesh LINK_PRIVATE ${CCMIO_LIBRARIES})
ADD_DEPENDENCIES(NekMesh libccmio-2.6.1)
ENDIF (NEKTAR_USE_CCM)
IF (NEKTAR_USE_VTK)
......
......@@ -38,7 +38,7 @@
#include <NekMeshUtils/Module/Module.h>
#include "ccmio.h"
#include <libccmio/ccmio.h>
namespace Nektar
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment