Commit 0f839691 authored by Christopher Bruns's avatar Christopher Bruns
Browse files

Created a couple of cmake cache variables for conditional building of cuda and brook libraries

Modified FindBrook.cmake to be a bit more specific about finding BROOK_INCLUDE_DIR, so it finds on my computer
parent e41c1b3d
...@@ -48,7 +48,7 @@ ENDIF(${CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT}) ...@@ -48,7 +48,7 @@ ENDIF(${CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT})
INCLUDE(Dart) INCLUDE(Dart)
SUBDIRS (platforms/reference/tests platforms/cuda) # SUBDIRS (platforms/reference/tests platforms/cuda)
ADD_DEFINITIONS(-DOPENMM_BUILDING_SHARED_LIBRARY) ADD_DEFINITIONS(-DOPENMM_BUILDING_SHARED_LIBRARY)
...@@ -56,7 +56,6 @@ ADD_DEFINITIONS(-DOPENMM_BUILDING_SHARED_LIBRARY) ...@@ -56,7 +56,6 @@ ADD_DEFINITIONS(-DOPENMM_BUILDING_SHARED_LIBRARY)
# this CMakeLists file rather than letting CMake visit them as SUBDIRS. # this CMakeLists file rather than letting CMake visit them as SUBDIRS.
SET(OPENMM_SOURCE_SUBDIRS . openmmapi olla platforms/reference) SET(OPENMM_SOURCE_SUBDIRS . openmmapi olla platforms/reference)
# The build system will set ARCH64 for 64 bit builds, which require # The build system will set ARCH64 for 64 bit builds, which require
# use of the lib64/ library directories rather than lib/. # use of the lib64/ library directories rather than lib/.
#SET( ARCH64 OFF CACHE BOOL "ON for 64bit builds, OFF for 32bit builds") #SET( ARCH64 OFF CACHE BOOL "ON for 64bit builds, OFF for 32bit builds")
...@@ -249,6 +248,21 @@ IF(DL_LIBRARY) ...@@ -249,6 +248,21 @@ IF(DL_LIBRARY)
TARGET_LINK_LIBRARIES(${STATIC_TARGET} ${DL_LIBRARY}) TARGET_LINK_LIBRARIES(${STATIC_TARGET} ${DL_LIBRARY})
ENDIF(DL_LIBRARY) ENDIF(DL_LIBRARY)
ADD_SUBDIRECTORY(platforms/reference/tests)
# Which hardware platforms to build
SET(OPENMM_BUILD_CUDA_LIB ON CACHE BOOL "Build OpenMMCuda library for Nvidia GPUs")
IF(OPENMM_BUILD_CUDA_LIB)
ADD_SUBDIRECTORY(platforms/cuda)
ENDIF(OPENMM_BUILD_CUDA_LIB)
SET(OPENMM_BUILD_BROOK_LIB ON CACHE BOOL "Build OpenMMBrook library for ATI GPUs")
IF(OPENMM_BUILD_BROOK_LIB)
ADD_SUBDIRECTORY(platforms/brook)
ENDIF(OPENMM_BUILD_BROOK_LIB)
INSTALL_TARGETS(/lib RUNTIME_DIRECTORY /lib ${SHARED_TARGET}) INSTALL_TARGETS(/lib RUNTIME_DIRECTORY /lib ${SHARED_TARGET})
INSTALL_TARGETS(/lib RUNTIME_DIRECTORY /lib ${STATIC_TARGET}) INSTALL_TARGETS(/lib RUNTIME_DIRECTORY /lib ${STATIC_TARGET})
FILE(GLOB CORE_HEADERS include/*.h */include/*.h) FILE(GLOB CORE_HEADERS include/*.h */include/*.h)
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
FIND_PATH(BROOK_INCLUDE_DIR brook $ENV{BROOKROOT}/sdk/include) FIND_PATH(BROOK_INCLUDE_DIR brook/brook.hpp $ENV{BROOKROOT}/sdk/include)
SET(BROOK_CXXFLAGS "-I${BROOK_INCLUDE_DIR}") SET(BROOK_CXXFLAGS "-I${BROOK_INCLUDE_DIR}")
SET(BROOK_CFLAGS "${BROOK_CXXFLAGS}") SET(BROOK_CFLAGS "${BROOK_CXXFLAGS}")
......
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