Skip to content
Snippets Groups Projects
Commit 0ee7d462 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix MSH_NUM_TYPES + be more verbose in cmake

parent 8ceeb52d
No related branches found
No related tags found
No related merge requests found
......@@ -166,13 +166,18 @@ macro(find_all_libraries VARNAME LISTNAME PATH SUFFIX)
endif(NUM_FOUND_LIBRARIES LESS NUM_LIST)
endmacro(find_all_libraries)
macro(set_config_option VARNAME STRING)
set(${VARNAME} TRUE)
list(APPEND CONFIG_OPTIONS ${STRING})
message(STATUS "Found " ${STRING})
endmacro(set_config_option)
# check if the machine is 64 bits (this is more reliable than using
# CMAKE_SIZEOF_VOID_P, which does not seem to work e.g. on some Suse
# machines)
check_type_size("void*" SIZEOF_VOID_P)
if(SIZEOF_VOID_P EQUAL 8)
set(HAVE_64BIT_SIZE_T TRUE)
list(APPEND CONFIG_OPTIONS "Have64BitSizeT")
set_config_option(HAVE_64BIT_SIZE_T "Have64BitSizeT")
endif(SIZEOF_VOID_P EQUAL 8)
if(ENABLE_BLAS_LAPACK)
......@@ -191,16 +196,14 @@ if(ENABLE_BLAS_LAPACK)
set(MKL_LIBS_REQUIRED libguide40 mkl_intel_c mkl_intel_thread mkl_core)
find_all_libraries(LAPACK_LIBRARIES MKL_LIBS_REQUIRED "" ${MKL_PATH})
if(LAPACK_LIBRARIES)
set(HAVE_BLAS TRUE)
set(HAVE_LAPACK TRUE)
list(APPEND CONFIG_OPTIONS "IntelMKL")
set_config_option(HAVE_BLAS "Blas(IntelMKL)")
set_config_option(HAVE_LAPACK "Lapack(IntelMKL)")
else(LAPACK_LIBRARIES)
set(REFLAPACK_LIBS_REQUIRED lapack blas g2c gcc)
find_all_libraries(LAPACK_LIBRARIES REFLAPACK_LIBS_REQUIRED "" "")
if(LAPACK_LIBRARIES)
set(HAVE_BLAS TRUE)
set(HAVE_LAPACK TRUE)
list(APPEND CONFIG_OPTIONS "RefBlas" "RefLapack")
set_config_option(HAVE_BLAS "Blas(Ref)")
set_config_option(HAVE_LAPACK "Lapack(Ref)")
endif(LAPACK_LIBRARIES)
endif(LAPACK_LIBRARIES)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
......@@ -214,22 +217,19 @@ if(ENABLE_BLAS_LAPACK)
set(MKL_LIBS_REQUIRED mkl_gf_lp64 iomp5 mkl_gnu_thread mkl_core guide pthread)
find_all_libraries(LAPACK_LIBRARIES MKL_LIBS_REQUIRED "" ${MKL_PATH})
if(LAPACK_LIBRARIES)
set(HAVE_BLAS TRUE)
set(HAVE_LAPACK TRUE)
list(APPEND CONFIG_OPTIONS "IntelMKL")
set_config_option(HAVE_BLAS "Blas(IntelMKL)")
set_config_option(HAVE_LAPACK "Lapack(IntelMKL)")
endif(LAPACK_LIBRARIES)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
# on SunOS we know blas and lapack are available in sunperf
set(HAVE_BLAS TRUE)
set(HAVE_LAPACK TRUE)
list(APPEND CONFIG_OPTIONS "SunPerf")
set_config_option(HAVE_BLAS "Blas(SubPerf)")
set_config_option(HAVE_LAPACK "Lapack(SunPerf)")
set(LAPACK_FLAGS -library=sunperf)
elseif(APPLE)
# on Mac we also know that blas and lapack are available
set(LAPACK_LIBRARIES "-framework vecLib")
set(HAVE_BLAS TRUE)
set(HAVE_LAPACK TRUE)
list(APPEND CONFIG_OPTIONS "VecLib")
set_config_option(HAVE_BLAS "Blas(VecLib)")
set_config_option(HAVE_LAPACK "Lapack(VecLib)")
endif(MSVC)
if(NOT HAVE_BLAS OR NOT HAVE_LAPACK)
# if we haven't found blas and lapack without using the standard
......@@ -237,12 +237,10 @@ if(ENABLE_BLAS_LAPACK)
enable_language(Fortran)
find_package(BLAS)
if(BLAS_FOUND)
set(HAVE_BLAS TRUE)
list(APPEND CONFIG_OPTIONS "Blas")
set_config_option(HAVE_BLAS "Blas")
find_package(LAPACK)
if(LAPACK_FOUND)
set(HAVE_LAPACK TRUE)
list(APPEND CONFIG_OPTIONS "Lapack")
set_config_option(HAVE_LAPACK "Lapack")
else(LAPACK_FOUND)
set(LAPACK_LIBRARIES ${BLAS_LIBRARIES})
endif(LAPACK_FOUND)
......@@ -257,6 +255,10 @@ if(ENABLE_BLAS_LAPACK)
endif(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
endif(BLAS_FOUND)
endif(NOT HAVE_BLAS OR NOT HAVE_LAPACK)
if(NOT HAVE_BLAS OR NOT HAVE_LAPACK)
message("WARNING: Could not find Blas or Lapack: most meshing algorithms"
"will not be functional")
endif(NOT HAVE_BLAS OR NOT HAVE_LAPACK)
endif(ENABLE_BLAS_LAPACK)
add_subdirectory(Common)
......@@ -265,31 +267,26 @@ add_subdirectory(Geo)
if(ENABLE_MESH)
add_subdirectory(Mesh)
set(HAVE_MESH TRUE)
list(APPEND CONFIG_OPTIONS "Mesh")
set_config_option(HAVE_MESH "Mesh")
endif(ENABLE_MESH)
if(ENABLE_SOLVER)
add_subdirectory(Solver)
set(HAVE_SOLVER TRUE)
list(APPEND CONFIG_OPTIONS "Solver")
set_config_option(HAVE_SOLVER "Solver")
endif(ENABLE_SOLVER)
if(ENABLE_POST)
add_subdirectory(Post)
set(HAVE_POST TRUE)
list(APPEND CONFIG_OPTIONS "Post")
set_config_option(HAVE_POST "Post")
if(ENABLE_PLUGINS)
add_subdirectory(Plugin)
set(HAVE_PLUGINS TRUE)
list(APPEND CONFIG_OPTIONS "Plugins")
set_config_option(HAVE_PLUGINS "Plugins")
endif(ENABLE_PLUGINS)
endif(ENABLE_POST)
if(ENABLE_PARSER)
add_subdirectory(Parser)
set(HAVE_PARSER TRUE)
list(APPEND CONFIG_OPTIONS "Parser")
set_config_option(HAVE_PARSER "Parser")
endif(ENABLE_PARSER)
if(ENABLE_FLTK)
......@@ -298,13 +295,13 @@ if(ENABLE_FLTK)
find_package(FLTK)
if(FLTK_FOUND)
add_subdirectory(Fltk)
set(HAVE_FLTK TRUE)
list(APPEND CONFIG_OPTIONS "Fltk")
set_config_option(HAVE_FLTK "Fltk")
list(APPEND EXTERNAL_INCLUDES ${FLTK_INCLUDE_DIR})
if(FLTK_CONFIG_SCRIPT)
execute_process(COMMAND ${FLTK_CONFIG_SCRIPT} --api-version
OUTPUT_VARIABLE FLTK_VERSION)
message("-- Found fltk-config script for FLTK " ${FLTK_VERSION})
string(STRIP ${FLTK_VERSION} FLTK_VERSION)
message(STATUS "Found fltk-config script for FLTK " ${FLTK_VERSION})
endif(FLTK_CONFIG_SCRIPT)
if(ENABLE_NATIVE_FILE_CHOOSER)
if(NOT FLTK_VERSION OR FLTK_VERSION EQUAL 1.1)
......@@ -312,16 +309,14 @@ if(ENABLE_FLTK)
include_directories(contrib/NativeFileChooser)
add_definitions(-DFLTK1)
endif(NOT FLTK_VERSION OR FLTK_VERSION EQUAL 1.1)
set(HAVE_NATIVE_FILE_CHOOSER TRUE)
list(APPEND CONFIG_OPTIONS "NativeFileChooser")
set_config_option(HAVE_NATIVE_FILE_CHOOSER "NativeFileChooser")
endif(ENABLE_NATIVE_FILE_CHOOSER)
if(ENABLE_FL_TREE)
if(NOT FLTK_VERSION OR FLTK_VERSION EQUAL 1.1)
add_subdirectory(contrib/Fl_Tree)
include_directories(contrib/Fl_Tree)
endif(NOT FLTK_VERSION OR FLTK_VERSION EQUAL 1.1)
set(HAVE_FL_TREE TRUE)
list(APPEND CONFIG_OPTIONS "FlTree")
set_config_option(HAVE_FL_TREE "FlTree")
endif(ENABLE_FL_TREE)
if(APPLE AND FLTK_VERSION EQUAL 1.3)
# required for system sounds (until cmake updates find_package(FLTK))
......@@ -334,8 +329,7 @@ elseif(ENABLE_QT)
include(${QT_USE_FILE})
if(QT_FOUND)
add_subdirectory(Qt)
set(HAVE_QT TRUE)
list(APPEND CONFIG_OPTIONS "Qt")
set_config_option(HAVE_QT "Qt")
list(APPEND EXTERNAL_INCLUDES ${QT_INCLUDE_DIR})
endif(QT_FOUND)
endif(ENABLE_FLTK)
......@@ -351,8 +345,7 @@ if(HAVE_FLTK OR HAVE_QT OR ENABLE_GRAPHICS)
find_library(FLTK_JPEG fltkjpeg)
endif(NOT FLTK_JPEG)
if(FLTK_JPEG)
set(HAVE_LIBJPEG TRUE)
list(APPEND CONFIG_OPTIONS "FltkJpeg")
set_config_option(HAVE_LIBJPEG "Jpeg(Fltk)")
list(APPEND EXTERNAL_LIBRARIES ${FLTK_JPEG})
foreach(DIR ${FLTK_INCLUDE_DIR})
list(APPEND EXTERNAL_INCLUDES ${DIR}/FL/images ${DIR}/jpeg)
......@@ -362,8 +355,7 @@ if(HAVE_FLTK OR HAVE_QT OR ENABLE_GRAPHICS)
if(NOT FLTK_JPEG)
find_package(JPEG)
if(JPEG_FOUND)
set(HAVE_LIBJPEG TRUE)
list(APPEND CONFIG_OPTIONS "Jpeg")
set_config_option(HAVE_LIBJPEG "Jpeg")
list(APPEND EXTERNAL_LIBRARIES ${JPEG_LIBRARIES})
list(APPEND EXTERNAL_INCLUDES ${JPEG_INCLUDE_DIR})
endif(JPEG_FOUND)
......@@ -375,8 +367,7 @@ if(HAVE_FLTK OR HAVE_QT OR ENABLE_GRAPHICS)
find_library(FLTK_Z fltkz)
endif(NOT FLTK_Z)
if(FLTK_Z)
set(HAVE_LIBZ TRUE)
list(APPEND CONFIG_OPTIONS "FltkZlib")
set_config_option(HAVE_LIBZ "Zlib(Fltk)")
list(APPEND EXTERNAL_LIBRARIES ${FLTK_Z})
foreach(DIR ${FLTK_INCLUDE_DIR})
list(APPEND EXTERNAL_INCLUDES ${DIR}/FL/images ${DIR}/zlib)
......@@ -386,8 +377,7 @@ if(HAVE_FLTK OR HAVE_QT OR ENABLE_GRAPHICS)
if(NOT FLTK_Z)
find_package(ZLIB)
if(ZLIB_FOUND)
set(HAVE_LIBZ TRUE)
list(APPEND CONFIG_OPTIONS "Zlib")
set_config_option(HAVE_LIBZ "Zlib")
list(APPEND EXTERNAL_LIBRARIES ${ZLIB_LIBRARIES})
list(APPEND EXTERNAL_INCLUDES ${ZLIB_INCLUDE_DIR})
endif(ZLIB_FOUND)
......@@ -400,8 +390,7 @@ if(HAVE_FLTK OR HAVE_QT OR ENABLE_GRAPHICS)
find_library(FLTK_PNG fltkpng)
endif(NOT FLTK_PNG)
if(FLTK_PNG)
set(HAVE_LIBPNG TRUE)
list(APPEND CONFIG_OPTIONS "FltkPng")
set_config_option(HAVE_LIBPNG "Png(Fltk)")
list(APPEND EXTERNAL_LIBRARIES ${FLTK_PNG})
foreach(DIR ${FLTK_INCLUDE_DIR})
list(APPEND EXTERNAL_INCLUDES ${DIR}/FL/images ${DIR}/png)
......@@ -411,8 +400,7 @@ if(HAVE_FLTK OR HAVE_QT OR ENABLE_GRAPHICS)
if(NOT FLTK_PNG)
find_package(PNG)
if(PNG_FOUND)
set(HAVE_LIBPNG TRUE)
list(APPEND CONFIG_OPTIONS "Png")
set_config_option(HAVE_LIBPNG "Png")
list(APPEND EXTERNAL_LIBRARIES ${PNG_LIBRARIES})
list(APPEND EXTERNAL_INCLUDES ${PNG_INCLUDE_DIR})
endif(PNG_FOUND)
......@@ -423,65 +411,53 @@ if(HAVE_FLTK OR HAVE_QT OR ENABLE_GRAPHICS)
message(SEND_ERROR "Could not find GLU")
endif(NOT OPENGL_GLU_FOUND)
add_subdirectory(Graphics)
set(HAVE_OPENGL TRUE)
list(APPEND CONFIG_OPTIONS "OpenGL")
set_config_option(HAVE_OPENGL "OpenGL")
endif(HAVE_FLTK OR HAVE_QT OR ENABLE_GRAPHICS)
if(ENABLE_ANN)
add_subdirectory(contrib/ANN)
include_directories(contrib/ANN/include)
set(HAVE_ANN TRUE)
list(APPEND CONFIG_OPTIONS "Ann")
set_config_option(HAVE_ANN "Ann")
endif(ENABLE_ANN)
if(ENABLE_CHACO)
add_subdirectory(contrib/Chaco)
include_directories(contrib/Chaco/main)
set(HAVE_CHACO TRUE)
list(APPEND CONFIG_OPTIONS "Chaco")
set_config_option(HAVE_CHACO "Chaco")
endif(ENABLE_CHACO)
if(ENABLE_DINTEGRATION)
add_subdirectory(contrib/DiscreteIntegration)
include_directories(contrib/DiscreteIntegration)
set(HAVE_DINTEGRATION TRUE)
list(APPEND CONFIG_OPTIONS "DIntegration")
set_config_option(HAVE_DINTEGRATION "DIntegration")
endif(ENABLE_DINTEGRATION)
if(ENABLE_GMM)
include_directories(contrib/gmm)
set(HAVE_GMM TRUE)
list(APPEND CONFIG_OPTIONS "Gmm")
set_config_option(HAVE_GMM "Gmm")
endif(ENABLE_GMM)
if(ENABLE_KBIPACK)
add_subdirectory(contrib/kbipack)
include_directories(contrib/kbipack)
set(HAVE_KBIPACK TRUE)
list(APPEND CONFIG_OPTIONS "Kbipack")
set_config_option(HAVE_KBIPACK "Kbipack")
find_library(GMP_LIB NAMES libgmp.a libgmp.dll.a)
if(GMP_LIB)
message("-- Found GMP library")
set(HAVE_GMP TRUE)
set_config_option(HAVE_GMP "GMP")
list(APPEND EXTERNAL_LIBRARIES ${GMP_LIB})
else(GMP_LIB)
message("-- GMP library not found")
endif(GMP_LIB)
endif(ENABLE_KBIPACK)
if(ENABLE_MATHEX)
add_subdirectory(contrib/MathEx)
include_directories(contrib/MathEx)
set(HAVE_MATHEX TRUE)
list(APPEND CONFIG_OPTIONS "MathEx")
set_config_option(HAVE_MATHEX "MathEx")
endif(ENABLE_MATHEX)
if(ENABLE_MPI)
find_package(MPI)
if(MPI_FOUND)
message("-- Found MPI")
set(HAVE_MPI TRUE)
list(APPEND CONFIG_OPTIONS "MPI")
set_config_option(HAVE_MPI "MPI")
list(APPEND EXTERNAL_INCLUDES ${MPI_INCLUDE_DIR})
list(APPEND EXTERNAL_LIBRARIES ${MPI_LIBRARIES})
include(CMakeForceCompiler)
......@@ -492,15 +468,13 @@ endif(ENABLE_MPI)
if(ENABLE_MPEG_ENCODE)
add_subdirectory(contrib/mpeg_encode)
include_directories(contrib/mpeg_encode/headers)
set(HAVE_MPEG_ENCODE TRUE)
list(APPEND CONFIG_OPTIONS "Mpeg")
set_config_option(HAVE_MPEG_ENCODE "Mpeg")
endif(ENABLE_MPEG_ENCODE)
if(ENABLE_METIS)
add_subdirectory(contrib/Metis)
include_directories(contrib/Metis)
set(HAVE_METIS TRUE)
list(APPEND CONFIG_OPTIONS "Metis")
set_config_option(HAVE_METIS "Metis")
message("WARNING: By including Metis you have to comply with Metis' special "
"licensing requirements stated in contrib/Metis/README.txt.")
endif(ENABLE_METIS)
......@@ -509,24 +483,21 @@ if(ENABLE_NETGEN)
add_subdirectory(contrib/Netgen)
include_directories(contrib/Netgen contrib/Netgen/libsrc/include
contrib/Netgen/libsrc/interface)
set(HAVE_NETGEN TRUE)
list(APPEND CONFIG_OPTIONS "Netgen")
set_config_option(HAVE_NETGEN "Netgen")
add_definitions(-DNO_PARALLEL_THREADS)
endif(ENABLE_NETGEN)
if(ENABLE_TETGEN_NEW AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/TetgenNew/tetgen.h)
add_subdirectory(contrib/TetgenNew)
include_directories(contrib/TetgenNew)
set(HAVE_TETGEN TRUE)
list(APPEND CONFIG_OPTIONS "TetgenNew")
set_config_option(HAVE_TETGEN "Tetgen(New)")
add_definitions(-DTETLIBRARY)
message("WARNING: You are including an experimental version of Tetgen "
"that is KNOWN TO BE BUGGY on 64 bits archs and on WIN32/MSVC.")
elseif(ENABLE_TETGEN AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/Tetgen/tetgen.h)
add_subdirectory(contrib/Tetgen)
include_directories(contrib/Tetgen)
set(HAVE_TETGEN TRUE)
list(APPEND CONFIG_OPTIONS "Tetgen")
set_config_option(HAVE_TETGEN "Tetgen")
add_definitions(-DTETLIBRARY)
message("WARNING: By including Tetgen you have to comply with Tetgen's "
"special licensing requirements stated in contrib/Tetgen/LICENSE.")
......@@ -537,8 +508,7 @@ if(ENABLE_FOURIER_MODEL)
if(FFTW3_LIB)
find_library(FOURIER_MODEL_LIB FourierModel)
if(FOURIER_MODEL_LIB)
set(HAVE_FOURIER_MODEL TRUE)
list(APPEND CONFIG_OPTIONS "FourierModel")
set_config_option(HAVE_FOURIER_MODEL "FourierModel")
list(APPEND EXTERNAL_LIBRARIES ${FOURIER_MODEL_LIB} ${FFTW3_LIB})
endif(FOURIER_MODEL_LIB)
endif(FFTW3_LIB)
......@@ -550,16 +520,14 @@ if(ENABLE_MED OR ENABLE_CGNS)
if(ENABLE_MED)
find_library(MED_LIB med)
if(MED_LIB)
set(HAVE_MED TRUE)
list(APPEND CONFIG_OPTIONS "Med")
set_config_option(HAVE_MED "Med")
list(APPEND EXTERNAL_LIBRARIES ${MED_LIB})
endif(MED_LIB)
endif(ENABLE_MED)
if(ENABLE_CGNS)
find_library(CGNS_LIB cgns)
if(CGNS_LIB)
set(HAVE_LIBCGNS TRUE)
list(APPEND CONFIG_OPTIONS "Cgns")
set_config_option(HAVE_LIBCGNS "Cgns")
list(APPEND EXTERNAL_LIBRARIES ${CGNS_LIB})
endif(CGNS_LIB)
endif(ENABLE_CGNS)
......@@ -572,8 +540,7 @@ if(ENABLE_MED OR ENABLE_CGNS)
if(NOT HAVE_LIBZ) # necessary for non-GUI builds
find_package(ZLIB)
if(ZLIB_FOUND)
set(HAVE_LIBZ TRUE)
list(APPEND CONFIG_OPTIONS "Zlib")
set_config_option(HAVE_LIBZ "Zlib")
list(APPEND EXTERNAL_LIBRARIES ${ZLIB_LIBRARIES})
endif(ZLIB_FOUND)
endif(NOT HAVE_LIBZ)
......@@ -589,9 +556,8 @@ if(ENABLE_TAUCS)
if(TAUCS_LIB)
find_path(TAUCS_INC "taucs.h" PATH_SUFFIXES src include)
if(TAUCS_INC)
set(HAVE_TAUCS TRUE)
set_config_option(HAVE_TAUCS "Taucs")
add_definitions(-DTAUCS_CILK)
list(APPEND CONFIG_OPTIONS "Taucs")
list(APPEND EXTERNAL_LIBRARIES ${TAUCS_LIB})
list(APPEND EXTERNAL_INCLUDES ${TAUCS_INC})
endif(TAUCS_INC)
......@@ -603,8 +569,7 @@ if(ENABLE_LUA)
if(LUA_LIB)
find_path(LUA_INC "lua.h" PATH_SUFFIXES src include)
if(LUA_INC)
set(HAVE_LUA TRUE)
list(APPEND CONFIG_OPTIONS "Lua")
set_config_option(HAVE_LUA "Lua")
list(APPEND EXTERNAL_LIBRARIES ${LUA_LIB})
list(APPEND EXTERNAL_INCLUDES ${LUA_INC})
endif(LUA_INC)
......@@ -615,9 +580,7 @@ if(ENABLE_PETSC)
set(ENV_PETSC_DIR $ENV{PETSC_DIR})
set(ENV_PETSC_ARCH $ENV{PETSC_ARCH})
if(EXISTS ${ENV_PETSC_DIR}/${ENV_PETSC_ARCH}/conf/petscvariables)
message(STATUS "Found PETSc 3")
set(HAVE_PETSC TRUE)
list(APPEND CONFIG_OPTIONS "PETSc")
set_config_option(HAVE_PETSC "PETSc")
file(STRINGS ${ENV_PETSC_DIR}/${ENV_PETSC_ARCH}/conf/petscvariables
PETSC_VARIABLES NEWLINE_CONSUME)
# find include directories
......@@ -648,8 +611,7 @@ if(HAVE_PETSC AND ENABLE_SLEPC)
set(ENV_SLEPC_DIR $ENV{SLEPC_DIR})
find_library(SLEPC_LIB slepc PATHS ${ENV_SLEPC_DIR}/${ENV_PETSC_ARCH}/lib)
if(SLEPC_LIB)
set(HAVE_SLEPC TRUE)
list(APPEND CONFIG_OPTIONS "SLEPc")
set_config_option(HAVE_SLEPC "SLEPc")
list(APPEND EXTERNAL_LIBRARIES ${SLEPC_LIB})
list(APPEND EXTERNAL_INCLUDES ${ENV_SLEPC_DIR}/include)
endif(SLEPC_LIB)
......@@ -687,8 +649,7 @@ if(ENABLE_OCC)
find_path(OCC_INC "BRep_Tool.hxx" PATHS ENV CASROOT PATH_SUFFIXES inc
include opencascade)
if(OCC_INC)
set(HAVE_OCC TRUE)
list(APPEND CONFIG_OPTIONS "OpenCascade")
set_config_option(HAVE_OCC "OpenCascade")
list(APPEND EXTERNAL_LIBRARIES ${OCC_LIBS})
list(APPEND EXTERNAL_INCLUDES ${OCC_INC})
if(HAVE_64BIT_SIZE_T)
......@@ -713,8 +674,7 @@ if(ENABLE_ACIS)
if(ACIS_LIB)
find_path(ACIS_INC "kernapi.hxx" PATH_SUFFIXES include)
if(ACIS_INC)
set(HAVE_ACIS TRUE)
list(APPEND CONFIG_OPTIONS "Acis")
set_config_option(HAVE_ACIS "Acis")
list(APPEND EXTERNAL_LIBRARIES ${ACIS_LIB})
list(APPEND EXTERNAL_INCLUDES ${ACIS_INC})
endif(ACIS_INC)
......@@ -725,8 +685,7 @@ endif(ENABLE_ACIS)
if(ENABLE_OSMESA)
find_library(OSMESA_LIB OSMesa)
if(OSMESA_LIB)
set(HAVE_OSMESA TRUE)
list(APPEND CONFIG_OPTIONS "OSMesa")
set_config_option(HAVE_OSMESA "OSMesa")
list(APPEND EXTERNAL_LIBRARIES ${OSMESA_LIB})
endif(OSMESA_LIB)
endif(ENABLE_OSMESA)
......@@ -736,8 +695,7 @@ if(HAVE_LUA AND ENABLE_READLINE)
if(READLINE_LIB)
find_path(READLINE_INC "readline.h" PATH_SUFFIXES src readline include)
if(READLINE_INC)
set(HAVE_READLINE TRUE)
list(APPEND CONFIG_OPTIONS "Readline")
set_config_option(HAVE_READLINE "Readline")
list(APPEND EXTERNAL_LIBRARIES ${READLINE_LIB})
list(APPEND EXTERNAL_INCLUDES ${READLINE_INC})
endif(READLINE_INC)
......@@ -746,8 +704,7 @@ endif(HAVE_LUA AND ENABLE_READLINE)
check_function_exists(vsnprintf HAVE_VSNPRINTF)
if(NOT HAVE_VSNPRINTF)
set(HAVE_NO_VSNPRINTF TRUE)
list(APPEND CONFIG_OPTIONS "NoVsnprintf")
set_config_option(HAVE_NO_VSNPRINTF "NoVsnprintf")
endif(NOT HAVE_VSNPRINTF)
check_include_file(sys/socket.h HAVE_SYS_SOCKET_H)
......@@ -757,15 +714,13 @@ endif(HAVE_SYS_SOCKET_H)
check_type_size(socklen_t SOCKLEN_T_SIZE)
if(NOT SOCKLEN_T_SIZE)
set(HAVE_NO_SOCKLEN_T TRUE)
list(APPEND CONFIG_OPTIONS "NoSocklenT")
set_config_option(HAVE_NO_SOCKLEN_T "NoSocklenT")
endif(NOT SOCKLEN_T_SIZE)
set(CMAKE_EXTRA_INCLUDE_FILES)
check_include_file(dlfcn.h DLFCN_H)
if(DLFCN_H)
set(HAVE_DLOPEN true)
list(APPEND CONFIG_OPTIONS "Dlopen")
set_config_option(HAVE_DLOPEN "Dlopen")
list(APPEND EXTERNAL_LIBRARIES ${CMAKE_DL_LIB})
endif(DLFCN_H)
......@@ -867,10 +822,10 @@ set_target_properties(shared PROPERTIES OUTPUT_NAME Gmsh)
if(HAVE_LAPACK AND LAPACK_FLAGS)
set_target_properties(shared PROPERTIES LINK_FLAGS ${LAPACK_FLAGS})
endif(HAVE_LAPACK AND LAPACK_FLAGS)
IF(MSVC AND ENABLE_MSVC_STATIC_RUNTIME)
if(MSVC AND ENABLE_MSVC_STATIC_RUNTIME)
message("WARNING: By enabling ENABLE_MSVC_STATIC_RUNTIME, shared library wont link."
"Change in msvc /MT flag to /MD in the shared project properties")
ENDIF(MSVC AND ENABLE_MSVC_STATIC_RUNTIME)
endif(MSVC AND ENABLE_MSVC_STATIC_RUNTIME)
target_link_libraries(shared ${LINK_LIBRARIES})
# binary targets
......@@ -1095,4 +1050,3 @@ message("")
mark_as_advanced(BISON FLEX GMP_LIB GMSH_EXTRA_VERSION HDF5_LIB MAKEINFO
MED_LIB OCC_INC SZ_LIB TAUCS_LIB LUA_LIB ACIS_LIB TEXI2PDF
READLINE_LIB)
......@@ -6,7 +6,7 @@
#ifndef _GMSH_DEFINES_H_
#define _GMSH_DEFINES_H_
// IO file formats
// IO file formats (numbers should not be changed)
#define FORMAT_MSH 1
#define FORMAT_UNV 2
#define FORMAT_GREF 3
......@@ -55,7 +55,7 @@
#define TYPE_POLYG 9
#define TYPE_POLYH 10
// Element types in .msh file format
// Element types in .msh file format (numbers should not be changed)
#define MSH_LIN_2 1
#define MSH_TRI_3 2
#define MSH_QUA_4 3
......@@ -132,7 +132,7 @@
#define MSH_TET_220 74
#define MSH_TET_286 75
#define MSH_NUM_TYPE 71
#define MSH_NUM_TYPE 75
// Geometric entities
#define ENT_NONE 0
......@@ -142,13 +142,13 @@
#define ENT_VOLUME (1<<3)
#define ENT_ALL (ENT_POINT | ENT_LINE | ENT_SURFACE | ENT_VOLUME)
// 2D mesh algorithms (numbers should not be changed)
// 2D meshing algorithms (numbers should not be changed)
#define ALGO_2D_MESHADAPT 1
#define ALGO_2D_MESHADAPT_OLD 4
#define ALGO_2D_DELAUNAY 5
#define ALGO_2D_FRONTAL 6
// 3D mesh algorithms (numbers should not be changed)
// 3D meshing algorithms (numbers should not be changed)
#define ALGO_3D_DELAUNAY 1
#define ALGO_3D_FRONTAL 4
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment