Commit dab6a417 authored by David Moxey's avatar David Moxey

Various things for release

parent f9ebc406
......@@ -102,17 +102,18 @@ INCLUDE(GetGitRevisionDescription)
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
# Set library, binary, include, share and doc paths.
SET(LIB_DIR "lib/nektar++-${NEKTAR_VERSION}")
SET(LIB_DIR "lib/nektar++")
IF( CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND NOT APPLE )
SET(LIB_DIR "lib64/nektar++-${NEKTAR_VERSION}")
SET(LIB_DIR "lib64/nektar++")
ENDIF()
SET(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ")
SET(NEKTAR_BIN_DIR bin)
SET(NEKTAR_LIB_DIR ${LIB_DIR})
SET(NEKTAR_INCLUDE_DIR include/nektar++-${NEKTAR_VERSION})
SET(NEKTAR_SHARE_DIR share/nektar++-${NEKTAR_VERSION})
SET(NEKTAR_DOC_DIR share/doc/nektar++-${NEKTAR_VERSION})
SET(NEKTAR_INCLUDE_DIR include/nektar++)
SET(NEKTAR_SHARE_DIR share/nektar++)
SET(NEKTAR_DOC_DIR share/doc/nektar++)
SET(NEKTAR_CMAKE_DIR ${LIB_DIR}/cmake)
# Build shared libraries.
SET(NEKTAR_LIBRARY_TYPE "SHARED")
......@@ -177,6 +178,12 @@ IF (NEKTAR_USE_THREAD_SAFETY)
ADD_DEFINITIONS(-DNEKTAR_USE_THREAD_SAFETY)
ENDIF()
# Disable backups
OPTION(NEKTAR_DISABLE_BACKUPS "Disable automatic backup file creation" OFF)
IF (NEKTAR_DISABLE_BACKUPS)
ADD_DEFINITIONS(-DNEKTAR_DISABLE_BACKUPS)
ENDIF()
IF (MSVC)
# Needed for M_PI to be visible in visual studio.
ADD_DEFINITIONS(-D_USE_MATH_DEFINES)
......@@ -281,7 +288,7 @@ IF (NEKTAR_BUILD_LIBRARY)
SET(NEKTAR++_LIBRARIES "" CACHE INTERNAL "")
ADD_SUBDIRECTORY(library)
INSTALL(EXPORT Nektar++Libraries DESTINATION ${LIB_DIR}/cmake COMPONENT dev)
INSTALL(EXPORT Nektar++Libraries DESTINATION ${NEKTAR_CMAKE_DIR} COMPONENT dev)
ENDIF (NEKTAR_BUILD_LIBRARY)
IF (NEKTAR_BUILD_TESTS)
......@@ -309,7 +316,7 @@ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/cmake/Nektar++Config.cmake.in
# Install Nektar++ CMake configuration file
INSTALL(FILES ${CMAKE_BINARY_DIR}/Nektar++Config.cmake
DESTINATION ${NEKTAR_LIB_DIR}/cmake/
DESTINATION ${NEKTAR_CMAKE_DIR}
COMPONENT dev)
# Install ThirdParty headers to subdirectory of ${NEKTAR_INCLUDE_DIR}
......
......@@ -541,6 +541,15 @@ Components of the \nekpp package can be selected using the following options:
Compiles utilities for pre- and post-processing simulation data.
\item \inlsh{NEKTAR\_DISABLE\_BACKUPS}
By default, Nektar++ solvers and the FieldConvert utility will not overwrite
any generated field files or output files if it finds an existing file with
the same name. Instead, the existing file will be either moving to a backup
file or you will be prompted to overwrite them. If you do not want this
behaviour, then disabling this option will cause all pre-existing output to
be overwritten silently.
\item \inlsh{NEKTAR\_SOLVER\_X}
Enabled compilation of the 'X' solver.
......
......@@ -1198,7 +1198,13 @@ namespace Nektar
LibUtilities::FieldMetaDataMap fieldMetaDataMap(m_fieldMetaDataMap);
mapping->Output( fieldMetaDataMap, outname);
m_fld->Write(outname, FieldDef, FieldData, fieldMetaDataMap, true);
#ifdef NEKTAR_DISABLE_BACKUPS
bool backup = false;
#else
bool backup = true;
#endif
m_fld->Write(outname, FieldDef, FieldData, fieldMetaDataMap, backup);
}
......
......@@ -128,6 +128,10 @@ int main(int argc, char* argv[])
return 1;
}
#ifdef NEKTAR_DISABLE_BACKUPS
vm.insert(std::make_pair("forceoutput", po::variable_value()));
#endif
// Print available modules.
if (vm.count("modules-list"))
{
......
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