| 1 |
|
# Top level cmake script for OpenMD. |
| 2 |
– |
|
| 3 |
– |
cmake_minimum_required (VERSION 2.6) |
| 2 |
|
project(OpenMD) |
| 3 |
+ |
# project(OpenMD CXX) |
| 4 |
|
|
| 5 |
+ |
CMAKE_MINIMUM_REQUIRED(VERSION 2.6) |
| 6 |
+ |
|
| 7 |
+ |
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules") |
| 8 |
+ |
|
| 9 |
+ |
if (NOT CMAKE_BUILD_TYPE) |
| 10 |
+ |
set(CMAKE_BUILD_TYPE "Release") |
| 11 |
+ |
endif() |
| 12 |
+ |
|
| 13 |
+ |
include(CheckCXXCompilerFlag) |
| 14 |
+ |
|
| 15 |
|
# OpenMD version number. |
| 16 |
|
set (VERSION_MAJOR "2") |
| 17 |
|
set (VERSION_MINOR "0") |
| 18 |
|
set (VERSION_TINY "0") |
| 19 |
|
|
| 20 |
< |
# cmake modules that are needed to build oopse |
| 21 |
< |
SET(CMAKE_MODULE_PATH ${OpenMD_SOURCE_DIR}/cmake/modules) |
| 20 |
> |
# Should |
| 21 |
> |
option(SINGLE_PRECISION "Build Single precision (float) version" OFF) |
| 22 |
> |
|
| 23 |
> |
|
| 24 |
|
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) |
| 25 |
|
SET(CMAKE_INSTALL_PREFIX |
| 26 |
|
"/usr/local/openmd" CACHE PATH "OpenMD install prefix" FORCE |
| 46 |
|
"Single directory for all static libraries." |
| 47 |
|
) |
| 48 |
|
|
| 38 |
– |
|
| 39 |
– |
enable_language(CXX C) |
| 40 |
– |
|
| 49 |
|
if ( APPLE ) |
| 50 |
|
set(MPI_COMPILER /opt/local/lib/openmpi/bin/mpic++) |
| 51 |
|
set(MPI_LIBRARY "MPI_LIBRARY-NOTFOUND" ) |
| 70 |
|
) |
| 71 |
|
ENDIF() |
| 72 |
|
|
| 73 |
+ |
|
| 74 |
+ |
include(CheckIncludeFile) |
| 75 |
+ |
include(CheckIncludeFileCXX) |
| 76 |
+ |
include(CheckSymbolExists) |
| 77 |
+ |
include(CheckLibraryExists) |
| 78 |
+ |
include(CheckTypeSize) |
| 79 |
+ |
include(CheckCSourceCompiles) |
| 80 |
+ |
check_include_file(conio.h HAVE_CONIO_H) |
| 81 |
+ |
check_symbol_exists(strncasecmp "string.h" HAVE_STRNCASECMP) |
| 82 |
|
# Optional libraries: If we can find these, we will build with them |
| 83 |
|
# Look for OpenBabel libraries |
| 84 |
|
find_package(OpenBabel2) |
| 107 |
|
endif(ZLIB_FOUND) |
| 108 |
|
|
| 109 |
|
#FFTW |
| 110 |
< |
INCLUDE(${CMAKE_MODULE_PATH}/FindFFTW.cmake) |
| 110 |
> |
FIND_PACKAGE(FFTW) |
| 111 |
|
IF(FFTW_FOUND) |
| 112 |
|
SET(HAVE_LIBFFTW 1) |
| 113 |
< |
SET(HAVE_FFTW3_H) |
| 113 |
> |
SET(HAVE_FFTW3_H 1) |
| 114 |
|
INCLUDE_DIRECTORIES(${FFTW_INCLUDE_DIR}) |
| 115 |
|
LINK_LIBRARIES(${FFTW_LIBRARIES}) |
| 116 |
|
ENDIF(FFTW_FOUND) |
| 125 |
|
COMMENT "Generating API documentation with Doxygen" VERBATIM |
| 126 |
|
) |
| 127 |
|
endif(DOXYGEN_FOUND) |
| 111 |
– |
|
| 112 |
– |
#include checks |
| 113 |
– |
include(CheckIncludeFile) |
| 114 |
– |
CHECK_INCLUDE_FILE(fftw3.h HAVE_FFTW3_H) |
| 115 |
– |
CHECK_INCLUDE_FILE(fftw.h HAVE_FFWT_H) |
| 116 |
– |
CHECK_INCLUDE_FILE(dfftw.h HAVE_DFFTW_H) |
| 117 |
– |
CHECK_INCLUDE_FILE(cmath.h HAVE_CMATH_H) |
| 118 |
– |
check_include_file(limits.h HAVE_LIMITS_H) |
| 119 |
– |
check_include_file(stdlib.h HAVE_STDLIB_H) |
| 120 |
– |
check_include_file(string.h HAVE_STRING_H) |
| 121 |
– |
check_include_file("sys/ioctl.h" HAVE_SYS_IOCTL_H) |
| 122 |
– |
check_include_file(unistd.h HAVE_UNISTD_H) |
| 128 |
|
|
| 124 |
– |
#symbol checks |
| 125 |
– |
include(CheckSymbolExists) |
| 126 |
– |
|
| 127 |
– |
#function checks |
| 128 |
– |
include(CheckFunctionExists) |
| 129 |
– |
check_function_exists(atexit HAVE_ATEXIT) |
| 130 |
– |
check_function_exists(floor HAVE_FLOOR) |
| 131 |
– |
check_function_exists(pow HAVE_POW) |
| 132 |
– |
check_function_exists(select HAVE_SELECT) |
| 133 |
– |
check_function_exists(sqrt HAVE_SQRT) |
| 134 |
– |
check_function_exists(strcasecmp HAVE_STRCASECMP) |
| 135 |
– |
check_function_exists(strchr HAVE_STRCHR) |
| 136 |
– |
check_function_exists(strdup HAVE_STRDUP) |
| 137 |
– |
check_function_exists(strncasecmp HAVE_STRNCASECMP) |
| 138 |
– |
check_function_exists(strstr HAVE_STRSTR) |
| 139 |
– |
check_function_exists(strtol HAVE_STRTOL) |
| 140 |
– |
check_function_exists(strtoull HAVE_STRTOULL) |
| 141 |
– |
check_function_exists(sysmp HAVE_SYSMP) |
| 142 |
– |
check_function_exists(table HAVE_TABLE) |
| 143 |
– |
|
| 144 |
– |
|
| 129 |
|
FIND_PACKAGE(Perl) |
| 130 |
|
IF(PERL_FOUND) |
| 131 |
|
SET(PERL ${PERL_EXECUTABLE}) |
| 142 |
|
|
| 143 |
|
SET(PERL_INSTALLDIRS "site" CACHE STRING "Perl installation locations") |
| 144 |
|
|
| 161 |
– |
|
| 145 |
|
configure_file ( |
| 146 |
|
"${PROJECT_SOURCE_DIR}/src/config.h.cmake" |
| 147 |
|
"${PROJECT_BINARY_DIR}/config.h" |
| 371 |
|
src/restraints/RestraintForceManager.cpp |
| 372 |
|
src/restraints/ThermoIntegrationForceManager.cpp |
| 373 |
|
src/utils/ProgressBar.cpp |
| 374 |
< |
src/utils/simError.c |
| 374 |
> |
src/utils/simError.cpp |
| 375 |
|
) |
| 376 |
|
|
| 377 |
|
IF(QHULL_FOUND) |
| 541 |
|
src/applications/utilities/principalAxisCalculator |
| 542 |
|
src/applications/utilities/stat2visco |
| 543 |
|
src/applications/utilities/waterRotator |
| 544 |
+ |
src/applications/utilities/waterReplacer |
| 545 |
|
) |
| 546 |
|
|
| 547 |
|
IF(PYTHON_EXECUTABLE) |