Commit 8154f6ce authored by Chris Cantwell's avatar Chris Cantwell

Merge branch 'feature/release-prep' into 'master'

Various things for release

See merge request !1005
parents 0ba5ca92 f65ba996
Pipeline #744 passed with stage
in 0 seconds
......@@ -102,17 +102,30 @@ 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")
IF( CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND NOT APPLE )
SET(LIB_DIR "lib64/nektar++-${NEKTAR_VERSION}")
SET(LIB_DIR "lib64")
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}/nektar++/cmake)
# Set ThirdParty locations.
SET(TPSRC ${CMAKE_SOURCE_DIR}/ThirdParty)
SET(TPBUILD ${CMAKE_BINARY_DIR}/ThirdParty)
SET(TPDIST ${CMAKE_BINARY_DIR}/ThirdParty/dist)
SET(TPINC ${CMAKE_INSTALL_PREFIX}/include/ThirdParty)
SET(TPLIB ${CMAKE_INSTALL_PREFIX}/${NEKTAR_LIB_DIR}/nektar++/thirdparty)
# Create ThirdParty source directory if it doesn't exist already.
IF (NOT EXISTS ${TPSRC})
FILE(MAKE_DIRECTORY ${TPSRC})
ENDIF ()
# Build shared libraries.
SET(NEKTAR_LIBRARY_TYPE "SHARED")
......@@ -120,12 +133,14 @@ SET(NEKTAR_LIBRARY_TYPE "SHARED")
# Set up RPATH
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
SET(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${LIB_DIR}")
SET(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${LIB_DIR}" "${TPLIB}")
LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
"${CMAKE_INSTALL_PREFIX}/${LIB_DIR}" isSystemDir)
"${CMAKE_INSTALL_PREFIX}/${LIB_DIR}" isSystemDir)
IF("${isSystemDir}" STREQUAL "-1")
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_DIR}")
ENDIF("${isSystemDir}" STREQUAL "-1")
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_DIR}" "${TPLIB}/")
ELSE()
SET(CMAKE_INSTALL_RPATH "${TPLIB}")
ENDIF()
# Get rid of OS X RPATH warnings -- we should set this to 1 once we reach
# required minimum cmake version of 3.0.0 and configure it in a more sane
......@@ -177,6 +192,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)
......@@ -197,17 +218,6 @@ ELSE()
SET(TPURL http://www.nektar.info/thirdparty)
ENDIF()
SET(TPSRC ${CMAKE_SOURCE_DIR}/ThirdParty)
SET(TPBUILD ${CMAKE_BINARY_DIR}/ThirdParty)
SET(TPDIST ${CMAKE_BINARY_DIR}/ThirdParty/dist)
SET(TPINC ${CMAKE_INSTALL_PREFIX}/include/ThirdParty)
SET(TPLIB ${CMAKE_INSTALL_PREFIX}/${NEKTAR_LIB_DIR})
# Create ThirdParty source directory if it doesn't exist already.
IF (NOT EXISTS ${TPSRC})
FILE(MAKE_DIRECTORY ${TPSRC})
ENDIF ()
# Find ThirdParty libraries and headers.
# --------------------------------------
......@@ -281,7 +291,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,9 +319,15 @@ 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(CODE "FILE(GLOB tplibs ${TPDIST}/lib/*${CMAKE_SHARED_LIBRARY_SUFFIX}*)
IF (NOT tplibs STREQUAL \"\")
FILE(INSTALL \${tplibs} DESTINATION ${TPLIB})
ENDIF()
")
# Install ThirdParty headers to subdirectory of ${NEKTAR_INCLUDE_DIR}
INSTALL(DIRECTORY ${TPDIST}/include/
DESTINATION ${NEKTAR_INCLUDE_DIR}/ThirdParty
......@@ -319,14 +335,6 @@ INSTALL(DIRECTORY ${TPDIST}/include/
OPTIONAL
)
# Install ThirdParty libraries into ${NEKTAR_LIB_DIR}. These are shipped with
# the LibUtilities library.
INSTALL(DIRECTORY ${TPDIST}/lib/
DESTINATION ${NEKTAR_LIB_DIR}
COMPONENT libutilities
OPTIONAL
)
ADD_SUBDIRECTORY(docs)
IF(NEKTAR_BUILD_PACKAGES)
......
......@@ -176,6 +176,8 @@ IF (THIRDPARTY_BUILD_BOOST)
SET(Boost_LIBRARY_DIRS ${TPSRC}/dist/lib)
SET(Boost_CONFIG_LIBRARY_DIR ${TPLIB})
INCLUDE_DIRECTORIES(${TPDIST}/include)
STRING(REPLACE ";" ", " NEEDED_BOOST_LIBS_STRING "${NEEDED_BOOST_LIBS}")
MESSAGE(STATUS "Build boost libs: ${NEEDED_BOOST_LIBS_STRING}")
ELSE (THIRDPARTY_BUILD_BOOST)
......
......@@ -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 they find an existing file with
the same name. Instead, the existing file will be either moved to a backup
file or you will be prompted to overwrite them. If you do not want this
behaviour, then enabling this option will cause all pre-existing output to
be overwritten silently.
\item \inlsh{NEKTAR\_SOLVER\_X}
Enabled compilation of the 'X' solver.
......
......@@ -84,7 +84,10 @@ void ProcessRemoveField::Process(po::variables_map &vm)
m_f->m_variables.erase(it);
m_f->m_exp.erase(m_f->m_exp.begin() + fieldID);
cout << "Field " << fieldName[i] << " has been erased" << endl;
if (m_f->m_comm->TreatAsRankZero())
{
cout << "Field " << fieldName[i] << " has been erased" << endl;
}
}
}
} // namespace FieldUtils
......
......@@ -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