3 #################################
4 ## Optional use of zlib to compress binary output files (defaults to off on windows)
6 option(ENABLE_ZLIB "When set to ON, a gzip compression option for binary output files is available" OFF)
8 option(ENABLE_ZLIB "When set to ON, a gzip compression option for binary output files is available" ON)
11 #################################
12 ## Optional static build
13 ## ENABLE_STATIC is an option to control whether HOOMD is built as a statically linked exe or as a python module.
15 OPTION(ENABLE_STATIC "Link as many libraries as possible statically, cannot be changed after the first run of CMake" ON)
17 OPTION(ENABLE_STATIC "Link as many libraries as possible statically, cannot be changed after the first run of CMake" OFF)
20 mark_as_advanced(ENABLE_STATIC)
22 #################################
23 ## Optional single/double precision build
24 option(SINGLE_PRECISION "Use single precision math" ON)
26 #####################3
27 ## CUDA related options
28 find_package(CUDA QUIET)
30 option(ENABLE_CUDA "Enable the compilation of the CUDA GPU code" on)
32 option(ENABLE_CUDA "Enable the compilation of the CUDA GPU code" off)
35 # disable CUDA if the intel compiler is detected
36 if (CMAKE_CXX_COMPILER MATCHES "icpc")
37 set(ENABLE_CUDA OFF CACHE BOOL "Forced OFF by the use of the intel c++ compiler" FORCE)
38 endif (CMAKE_CXX_COMPILER MATCHES "icpc")
41 # optional ocelot emulation mode (not tested any more)
42 # option(ENABLE_OCELOT "Enable ocelot emulation for CUDA GPU code" off)
45 # add_definitions(-DCUDA_ARCH=${CUDA_ARCH})
46 # list(APPEND CUDA_NVCC_FLAGS -arch "sm_${CUDA_ARCH}")
47 # endif (ENABLE_OCELOT)
49 option(ENABLE_NVTOOLS "Enable NVTools profiler integration" off)
52 ############################
53 ## MPI related options
55 if (MPI_FOUND OR MPI_C_FOUND OR MPI_CXX_FOUND)
56 option(ENABLE_MPI "Enable the compilation of the MPI communication code" on)
58 option (ENABLE_MPI "Enable the compilation of the MPI communication code" off)
61 #################################
62 ## Optionally enable documentation build
63 OPTION(ENABLE_DOXYGEN "Enables building of documentation with doxygen" OFF)
67 # get the doxygen version
68 exec_program(${DOXYGEN_EXECUTABLE} ${HOOMD_SOURCE_DIR} ARGS --version OUTPUT_VARIABLE DOXYGEN_VERSION)
70 if (${DOXYGEN_VERSION} VERSION_GREATER 1.8.4)
71 else (${DOXYGEN_VERSION} VERSION_GREATER 1.8.4)
72 message(STATUS "Doxygen version less than 1.8.5, documentation may not build correctly")
73 endif (${DOXYGEN_VERSION} VERSION_GREATER 1.8.4)
77 ###############################
78 ## install python code into the system site dir, if a system python installation is desired
79 SET(PYTHON_SITEDIR "" CACHE STRING "System python site-packages directory to install python module code to. If unspecified, install to lib/hoomd/python-module")
81 set(HOOMD_PYTHON_MODULE_DIR ${PYTHON_SITEDIR})
83 set(HOOMD_PYTHON_MODULE_DIR ${LIB_INSTALL_DIR}/python-module)
84 endif (PYTHON_SITEDIR)
85 mark_as_advanced(PYTHON_SITEDIR)