Commit c8c02060 authored by Kilian Lackhove's avatar Kilian Lackhove
Browse files

Merge branch 'master' into tidy/SessionFunction

parents 53e41adc ec641e68
......@@ -11,6 +11,6 @@ AllowShortCaseLabelsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
IndentCaseLabels: true
Standard: Cpp03
Standard: Cpp11
AccessModifierOffset: -4
BinPackParameters: true
Changelog
=========
v4.5.0
v5.0.0
------
**NekMesh**:
**Library**
- Added in sum factorisation version for pyramid expansions and orthogonal
expansion in pyramids (!750)
- Significant overhaul of CMake infrastructure (!770, !804)
- Fix ThridpartyCCM options (!802)
- Fix Windows CRLF tokens in GEO reader and improve comment handling (!805)
- Use chrono in Timer (!807)
**NekMesh**:
- Add feature to read basic 2D geo files as CAD (!731)
- Add periodic boundary condition meshing in 2D (!733)
- Adjust boundary layer thickness in corners in 2D (!739)
- Add non-O BL meshing in 2D (!757)
- Add ability to compile CCIO library but tar file is not yet openly
available whist we seek permission from Simens (!799)
- Fix issue with reading CCM files due to definition of default arrays
rather than a vector (!797)
- Fix inverted triangles and small memory issue in surface meshing (!798)
**FieldConvert**:
- Add input module for Semtex field files (!777)
**Documentation**:
- Added the developer-guide repository as a submodule (!751)
v4.4.2
------
**NekMesh**:
- Fix uninitialised memory bug in Nek5000 input module (!801)
**Library**
- Fix ability to set default implementation in Collections and added an option
to set eNoCollections in FieldConvert as default (!789)
v4.4.1
------
**Library**
- Remove m_offset_elmt_id and GetOffsetElmtId which fixed problems in 2D when
quad elements are listed before tri elements (!758)
- Remove the duplicate output of errorutil (!756)
- Fix BLAS CMake dependencies (!763)
- Fix interpolation issue with Lagrange basis functions (!768)
- Fix issue with average fields not working with different polynomial order
fields (!776)
- Fix rounding of integer parameters (!774)
- Fix Hdf5 output in FilterFieldConvert (!781)
- Fixed extreme memory consumption of Interpolator when interpolating from pts
to fld or between different meshes (!783)
- Fix deadlock with HDF5 input (!786)
- Fix missing entriess in LibUtilities::kPointsTypeStr (!792)
- Fix compiler warnings with CommDataType (!793)
**FieldConvert:**
- Fix issue with field ordering in the interppointdatatofld module (!754)
- Fix issue with FieldConvert when range flag used (!761)
- Fix issue when using output-points combined with noequispaced (!775)
- Fix equispacedoutput for 3DH1D with triangles (!787)
**NekMesh**:
- Fix memory consumption issue with Gmsh output (!747, !762)
- Rework meshing control so that if possible viewable meshes will be dumped
when some part of the system fails (!756)
- Add manifold meshing option (!756)
- Fix issue with older rea input files (!765)
- Fix memory leak in variational optimiser, add small optimisations (!785)
- Check the dimensionality of the CAD system before running the 2D generator (!780)
**IncNavierStokesSolver**
- Fix an initialisation issue when using an additional advective field (!779)
**Packaging**
- Added missing package for FieldUtils library (!755)
v4.4.0
------
**Library**:
......@@ -52,6 +117,7 @@ v4.4.0
- Fix bug in FieldUtils when using half mode expansions (!734)
- Do not read the same fld/pts files again for every variable (!670)
- Fix bug in CMake PETSc detection for Ubuntu 16.04/Debian 9 (!735)
- Fix warnings with Intel compiler (!742)
**ADRSolver:**
- Add a projection equation system for C^0 projections (!675)
......@@ -105,6 +171,7 @@ v4.4.0
(!712)
- 2D to 3D mesh extrusion module (!715)
- Add new two-dimensional mesher from NACA code or step file (!720)
- Add basic gmsh cad (.geo) reader to the meshing system (!731)
- Fix inverted boundary layer in 2D (!736)
- More sensible element sizing with boundary layers in 2D (!736)
- Change variable names in mcf file to make more sense (!736)
......
......@@ -5,14 +5,34 @@ RelWithDebInfo MinSizeRel.")
PROJECT(Nektar++ C CXX)
# Nektar++ requires C++11. Try to infer this for older CMake versions (less than
# 3.1.0)
IF ("${CMAKE_VERSION}" VERSION_LESS "3.1")
IF (NOT MSVC)
INCLUDE(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
IF (COMPILER_SUPPORTS_CXX11)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
ELSE()
MESSAGE(FATAL_ERROR "Nektar++ requires a compiler with C++11 support.")
ENDIF()
ELSEIF(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0)
MESSAGE(FATAL_ERROR "Nektar++ requires full C++11 support: please upgrade to Visual Studio 2013 or later")
ENDIF()
ELSE()
SET(CMAKE_CXX_STANDARD 11)
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
SET(CMAKE_CXX_EXTENSIONS OFF)
ENDIF()
INCLUDE(CheckLanguage)
CHECK_LANGUAGE(Fortran)
IF(CMAKE_Fortran_COMPILER)
ENABLE_LANGUAGE(Fortran)
ENABLE_LANGUAGE(Fortran)
ELSE()
MESSAGE(STATUS "No Fortran support")
MESSAGE(STATUS "No Fortran support")
ENDIF()
# Helps organize projects in IDEs.
......@@ -29,6 +49,7 @@ SET(NEKTAR_VERSION ${NEKTAR_VERSION_MAJOR}.${NEKTAR_VERSION_MINOR}.${NEKTAR_VERS
# Add support for CMAKE_DEPENDENT_OPTION
INCLUDE(CMakeDependentOption)
INCLUDE(CMakeParseArguments)
# Enable CTest.
ENABLE_TESTING()
......@@ -161,28 +182,24 @@ OPTION(NEKTAR_USE_EXPRESSION_TEMPLATES
MARK_AS_ADVANCED(NEKTAR_USE_EXPRESSION_TEMPLATES)
# BLAS Support
OPTION(NEKTAR_USE_BLAS_LAPACK "Use Blas and lapack routines." ON)
CMAKE_DEPENDENT_OPTION(NEKTAR_USE_SYSTEM_BLAS_LAPACK
"Use the system provided blas and lapack libraries" ON
"UNIX; NOT APPLE; NOT NEKTAR_USE_OPENBLAS; NOT NEKTAR_USE_MKL; NOT NEKTAR_USE_ACML; NOT NEKTAR_USE_ACCELERATE_FRAMEWORK" OFF)
CMAKE_DEPENDENT_OPTION(NEKTAR_USE_OPENBLAS
"Use OpenBLAS library as a substitute to native BLAS." OFF
"NEKTAR_USE_BLAS_LAPACK" OFF)
CMAKE_DEPENDENT_OPTION(NEKTAR_USE_SMV
"Use LibSMV library for faster small matrix-vector multiplies." OFF
"NEKTAR_USE_BLAS_LAPACK" OFF)
"NOT NEKTAR_USE_SYSTEM_BLAS_LAPACK" OFF)
CMAKE_DEPENDENT_OPTION(NEKTAR_USE_ACML
"Use the AMD Core Math Library (ACML) for BLAS and Lapack support." OFF
"NEKTAR_USE_BLAS_LAPACK" OFF)
"NOT NEKTAR_USE_SYSTEM_BLAS_LAPACK" OFF)
CMAKE_DEPENDENT_OPTION(NEKTAR_USE_MKL
"Use the Intel Math Kernel Library (MKL) for BLAS and Lapack support." OFF
"NEKTAR_USE_BLAS_LAPACK" OFF)
CMAKE_DEPENDENT_OPTION(NEKTAR_USE_SYSTEM_BLAS_LAPACK
"Use the system provided blas and lapack libraries" ON
"NEKTAR_USE_BLAS_LAPACK; UNIX; NOT APPLE; NOT NEKTAR_USE_OPENBLAS; NOT NEKTAR_USE_MKL; NOT NEKTAR_USE_ACML; NOT NEKTAR_USE_ACCELERATE_FRAMEWORK" OFF)
"NOT NEKTAR_USE_SYSTEM_BLAS_LAPACK" OFF)
CMAKE_DEPENDENT_OPTION(NEKTAR_USE_ACCELERATE_FRAMEWORK
"Use the Mac Accelerate Framework for BLAS and Lapack support." ON
"NEKTAR_USE_BLAS_LAPACK; APPLE" OFF)
"NOT NEKTAR_USE_SYSTEM_BLAS_LAPACK; APPLE" OFF)
CMAKE_DEPENDENT_OPTION(NEKTAR_USE_WIN32_LAPACK
"Use Win32 Lapack provided with the Third Party Distribution."
ON "NEKTAR_USE_BLAS_LAPACK; WIN32" OFF)
ON "NOT NEKTAR_USE_SYSTEM_BLAS_LAPACK; WIN32" OFF)
# Memory pools
OPTION(NEKTAR_USE_MEMORY_POOLS
......@@ -222,7 +239,6 @@ ENDIF ()
# Find ThirdParty libraries and headers.
INCLUDE (ThirdPartyTinyxml)
INCLUDE (ThirdPartyLoki)
INCLUDE (ThirdPartyMetis)
INCLUDE (ThirdPartyHDF5)
INCLUDE (ThirdPartyScotch)
......@@ -232,7 +248,6 @@ INCLUDE (ThirdPartyFFTW)
INCLUDE (ThirdPartyArpack)
INCLUDE (ThirdPartyMPI)
INCLUDE (ThirdPartyVTK)
INCLUDE (ThirdPartySMV)
INCLUDE (ThirdPartyOCE)
INCLUDE (ThirdPartyTetGen)
INCLUDE (ThirdPartyCCM)
......@@ -241,32 +256,18 @@ INCLUDE (Doxygen)
IF( NEKTAR_USE_MKL )
INCLUDE (FindMKL)
SET(NEKTAR_USING_BLAS TRUE)
SET(NEKTAR_USING_LAPACK TRUE)
SET(NEKTAR_USING_MKL TRUE)
ENDIF( NEKTAR_USE_MKL )
IF( NEKTAR_USE_OPENBLAS )
INCLUDE (FindOpenBlas)
SET(NEKTAR_USING_OPENBLAS TRUE)
ENDIF( NEKTAR_USE_OPENBLAS )
IF( NEKTAR_USE_SMV )
INCLUDE (FindSMV)
SET(NEKTAR_USING_SMV TRUE)
ADD_DEFINITIONS(-DNEKTAR_USING_SMV)
ENDIF( NEKTAR_USE_SMV )
IF( NEKTAR_USE_ACCELERATE_FRAMEWORK )
INCLUDE (FindAccelerateFramework)
ENDIF( NEKTAR_USE_ACCELERATE_FRAMEWORK )
IF( NEKTAR_USE_ACML )
INCLUDE (FindACML)
SET(NEKTAR_USING_BLAS TRUE)
SET(NEKTAR_USING_LAPACK TRUE)
SET(NEKTAR_USING_ACML TRUE)
ADD_DEFINITIONS(-DUSE_ACML)
ENDIF( NEKTAR_USE_ACML )
IF( NEKTAR_USE_WIN32_LAPACK )
......@@ -275,24 +276,12 @@ ENDIF( NEKTAR_USE_WIN32_LAPACK )
IF( NEKTAR_USE_SYSTEM_BLAS_LAPACK )
INCLUDE(ThirdPartyBlasLapack)
SET(NEKTAR_USING_BLAS TRUE)
SET(NEKTAR_USING_LAPACK TRUE)
ENDIF( NEKTAR_USE_SYSTEM_BLAS_LAPACK )
IF( NEKTAR_USE_BLAS_LAPACK )
SET(NEKTAR_USING_BLAS TRUE)
SET(NEKTAR_USING_LAPACK TRUE)
ADD_DEFINITIONS( -DNEKTAR_USING_LAPACK -DNEKTAR_USING_BLAS )
ENDIF( NEKTAR_USE_BLAS_LAPACK )
IF( NEKTAR_USE_TINYXML_STL )
ADD_DEFINITIONS( -DTIXML_USE_STL)
ENDIF( NEKTAR_USE_TINYXML_STL )
IF( NEKTAR_USE_DIRECT_BLAS_CALLS )
ADD_DEFINITIONS(-DNEKTAR_USING_DIRECT_BLAS_CALLS)
ENDIF( NEKTAR_USE_DIRECT_BLAS_CALLS )
IF( NEKTAR_USE_EXPRESSION_TEMPLATES )
ADD_DEFINITIONS(-DNEKTAR_USE_EXPRESSION_TEMPLATES -DNEKTAR_USING_CMAKE)
ENDIF( NEKTAR_USE_EXPRESSION_TEMPLATES )
......@@ -324,25 +313,26 @@ ENDIF (APPLE)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
# Build active components
# Build active components. Add utilities and solvers directories first, because
# that allows us to detect library dependencies automatically.
IF (NEKTAR_BUILD_LIBRARY)
SET(NEKTAR++_LIBRARIES SolverUtils LibUtilities StdRegions SpatialDomains LocalRegions
MultiRegions Collections GlobalMapping FieldUtils NekMeshUtils)
INCLUDE_DIRECTORIES(library)
ENDIF()
INCLUDE_DIRECTORIES(utilities)
ADD_SUBDIRECTORY(utilities)
INCLUDE_DIRECTORIES(solvers)
ADD_SUBDIRECTORY(solvers)
IF (NEKTAR_BUILD_LIBRARY)
# List of Nektar++ libraries will be rebuilt every configuration.
SET(NEKTAR++_LIBRARIES "" CACHE INTERNAL "")
ADD_SUBDIRECTORY(library)
INSTALL(EXPORT Nektar++Libraries DESTINATION ${LIB_DIR}/cmake COMPONENT dev)
ENDIF (NEKTAR_BUILD_LIBRARY)
IF (NEKTAR_BUILD_SOLVERS)
INCLUDE_DIRECTORIES(solvers)
ADD_SUBDIRECTORY(solvers)
ENDIF(NEKTAR_BUILD_SOLVERS)
IF (NEKTAR_BUILD_UTILITIES)
INCLUDE_DIRECTORIES(utilities)
ADD_SUBDIRECTORY(utilities)
ENDIF (NEKTAR_BUILD_UTILITIES)
IF (NEKTAR_BUILD_TESTS)
INCLUDE_DIRECTORIES(tests)
ADD_SUBDIRECTORY(tests)
......@@ -374,17 +364,18 @@ INSTALL(FILES ${CMAKE_BINARY_DIR}/Nektar++Config.cmake
# Install ThirdParty headers to subdirectory of ${NEKTAR_INCLUDE_DIR}
INSTALL(DIRECTORY ${TPDIST}/include/
DESTINATION ${NEKTAR_INCLUDE_DIR}/ThirdParty
COMPONENT ThirdParty
COMPONENT dev
)
# Install ThirdParty libraries into ${NEKTAR_LIB_DIR}
# Install ThirdParty libraries into ${NEKTAR_LIB_DIR}. These are shipped with
# the LibUtilities library.
INSTALL(DIRECTORY ${TPDIST}/lib/
DESTINATION ${NEKTAR_LIB_DIR}
COMPONENT ThirdParty
COMPONENT libutilities
)
ADD_SUBDIRECTORY(docs)
IF(NEKTAR_BUILD_PACKAGES)
add_subdirectory(pkg)
ADD_SUBDIRECTORY(pkg)
ENDIF(NEKTAR_BUILD_PACKAGES)
ADD_SUBDIRECTORY(docs)
......@@ -44,7 +44,9 @@ project. It's a pretty simple process:
diff and are not quite ready to merge, use the `[WIP]` tag in the title to
prevent your code from being accidentally merged.
5. Put a comment in the MR saying that it's ready to be merged.
6. Respond to any comments in the code review.
6. If your branch is a minor fix that could appear in the next patch release,
then add the `Proposed patch` label to the merge request.
7. Respond to any comments in the code review.
## Submission checklist
- Did you add regression tests (for fixes) or unit tests and/or normal tests for
......@@ -155,6 +157,78 @@ stick to the following process:
- Once feedback received from the branch author (if necessary) and reviewers are
happy, the branch will be merged.
## Release branches
Nektar++ releases are versioned in the standard form `x.y.z` where `x` is a
major release, `y` a minor release and `z` a patch release:
- major releases are extremely infrequent (on the order of every 2-3 years) and
denote major changes in functionality and the API;
- minor releases occur around twice per year and contain new features with minor
API changes;
- patch releases are targeted on roughly a monthly basis and are intended to
fix minor issues in the code.
The repository contains a number of _release branches_ named `release/x.y` for
each minor release, which are intended to contain **fixes and very minor
changes** from `master` and which form the next patch release. This allows us to
use `master` for the next minor release, whilst still having key fixes in patch
releases.
### Cherry-picking process
Any branches that are marked with the `Proposed patch` label should follow the
following additional steps to cherry pick commits into the `release/x.y` branch.
1. If the branch is on a remote other than `nektar/nektar`, make sure that's
added to your local repository.
2. On a local terminal, run `git fetch --all` to pull the latest changes. It's
important for the commands below that you do this _before_ you merge the
branch into `master`.
3. Merge the branch into master as usual using GitLab.
4. Switch to the appropriate branch with `git checkout release/x.y` and update
with `git pull`.
5. Now check the list of commits to cherry-pick.
```bash
git log --oneline --no-merges --reverse origin/master..REMOTE/fix/BRANCHNAME
```
where `REMOTE` is the remote on which the branch lives and `BRANCHNAME` is
the fix branch. If the list is empty, you probably did a `git fetch` after
you merged the branch into `master`; in this case use `origin/master^`.
6. If you're happy with the list (compare to the MR list on the GitLab MR if
necessary), cherry-pick the commits with the command:
```bash
git cherry-pick -x $(git rev-list --no-merges --reverse origin/master..REMOTE/fix/BRANCHNAME)
```
7. It's likely you'll encounter some conflicts, particularly with the
`CHANGELOG`. To fix these:
- `git status` to see what's broken
- Fix appropriately
- `git commit -a` to commit your fix
- `git cherry-pick --continue`
8. If everything becomes horribly broken, `git cherry-pick --abort`.
9. Once you're happy, `git push` to send your changes back to GitLab.
Steps 5 and 6 can be simplified by creating a script
```bash
#!/bin/bash
src=$1
logopts="--oneline --no-merges --reverse"
commits=`git log $logopts master..$1 | cut -f 1 -d " " | xargs`
echo "Will cherry-pick the following commits: $commits"
echo "Press ENTER to continue..."
read
cherryopts="-x --allow-empty --allow-empty-message"
git cherry-pick $cherryopts $commits
```
which accepts the name of the source branch as the sole argument.
## Formatting guidelines
Nektar++ uses C++, a language notorious for being easy to make obtuse and
difficult to follow code. To hopefully alleviate this problem, there are a
......
SET(GSMPI_SEARCH_PATHS
${CMAKE_SOURCE_DIR}/ThirdParty/gsmpi-1.2/
${CMAKE_SOURCE_DIR}/ThirdParty/gsmpi-1.2/build/
${CMAKE_SOURCE_DIR}/../ThirdParty/gsmpi-1.2/
${CMAKE_SOURCE_DIR}/../ThirdParty/gsmpi-1.2/build
${CMAKE_SOURCE_DIR}/ThirdParty/dist/lib
${CMAKE_SOURCE_DIR}/../ThirdParty/dist/lib)
FIND_LIBRARY(GSMPI_LIBRARY NAMES gsmpi PATHS ${GSMPI_SEARCH_PATHS})
SET(GSMPI_FOUND FALSE)
IF (GSMPI_LIBRARY)
SET(GSMPI_FOUND TRUE)
MARK_AS_ADVANCED(GSMPI_LIBRARY)
ENDIF (GSMPI_LIBRARY)
IF (GSMPI_FOUND)
IF (NOT GSMPI_FIND_QUIETLY)
MESSAGE(STATUS "Found GSMPI")
ENDIF (NOT GSMPI_FIND_QUIETLY)
ELSE(GSMPI_FOUND)
IF (GSMPI_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find GSLib")
ENDIF (GSMPI_FIND_REQUIRED)
ENDIF (GSMPI_FOUND)
......@@ -198,7 +198,7 @@ show :
else (WIN32)
set (libname ${name})
endif (WIN32)
find_library (PETSC_LIBRARY_${suffix} NAMES ${libname} HINTS ${petsc_lib_dir} NO_DEFAULT_PATH)
find_library (PETSC_LIBRARY_${suffix} NAMES ${libname} ${libname}_real HINTS ${petsc_lib_dir} NO_DEFAULT_PATH)
set (PETSC_LIBRARIES_${suffix} "${PETSC_LIBRARY_${suffix}}")
mark_as_advanced (PETSC_LIBRARY_${suffix})
endmacro (PETSC_FIND_LIBRARY suffix name)
......
......@@ -25,7 +25,7 @@
# Always runs the given test, use this when you need to re-run tests
# because parent variables have made old cache entries stale. The LANGUAGE
# variable is either C or CXX indicating which compiler the test should
# use.
# use.
# MULTIPASS_C_SOURCE_RUNS (Name INCLUDES LIBRARIES SOURCE RUNS)
# DEPRECATED! This is only included for backwards compatability. Use
# the more general MULTIPASS_SOURCE_RUNS instead.
......@@ -46,7 +46,7 @@ macro (FIND_PACKAGE_MULTIPASS _name _current)
# The name of the stored value for the given state
set (_stored_var PACKAGE_MULTIPASS_${_NAME}_${_state})
if (NOT "${${_stored_var}}" STREQUAL "${${_NAME}_${_state}}")
set (_states_current "NO")
set (_states_current "NO")
endif (NOT "${${_stored_var}}" STREQUAL "${${_NAME}_${_state}}")
set (${_stored_var} "${${_NAME}_${_state}}" CACHE INTERNAL "Stored state for ${_name}." FORCE)
list (REMOVE_AT _args 0)
......@@ -68,7 +68,7 @@ macro (FIND_PACKAGE_MULTIPASS _name _current)
if (_cmd STREQUAL "DEPENDENTS")
list (REMOVE_AT _args 0)
foreach (dep ${_args})
set (${_NAME}_${dep} "NOTFOUND" CACHE INTERNAL "Cleared" FORCE)
set (${_NAME}_${dep} "NOTFOUND" CACHE INTERNAL "Cleared" FORCE)
endforeach (dep)
endif (_cmd STREQUAL "DEPENDENTS")
set (${_NAME}_FOUND "NOTFOUND" CACHE INTERNAL "Cleared" FORCE)
......
SET(SMV_SEARCH_PATHS
${CMAKE_SOURCE_DIR}/ThirdParty/libsmv/build/lib
${CMAKE_SOURCE_DIR}/../ThirdParty/libsmv/build/lib
${CMAKE_SOURCE_DIR}/ThirdParty/dist/build/lib
${CMAKE_SOURCE_DIR}/../ThirdParty/dist/build/lib)
FIND_PATH(SMV_INCLUDE_DIR NAMES smv.h PATHS ${SMV_SEARCH_PATHS})
FIND_LIBRARY(SMV_LIBRARY NAMES smv PATHS ${SMV_SEARCH_PATHS})
SET(SMV_FOUND FALSE)
IF (SMV_LIBRARY)
SET(SMV_FOUND TRUE)
INCLUDE_DIRECTORIES(${SMV_INCLUDE_DIR})
MARK_AS_ADVANCED(SMV_LIBRARY)
MARK_AS_ADVANCED(SMV_INCLUDE_DIR)
ENDIF (SMV_LIBRARY)
IF (SMV_FOUND)
IF (NOT SMV_FIND_QUIETLY)
MESSAGE(STATUS "Found SMV: ${SMV_INCLUDE_DIR}")
ENDIF (NOT SMV_FIND_QUIETLY)
ELSE(SMV_FOUND)
IF (SMV_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find SMV")
ENDIF (SMV_FIND_REQUIRED)
ENDIF (SMV_FOUND)
SET(XXT_SEARCH_PATHS
${CMAKE_SOURCE_DIR}/ThirdParty/gsmpi-1.2/
${CMAKE_SOURCE_DIR}/ThirdParty/gsmpi-1.2/build/
${CMAKE_SOURCE_DIR}/../ThirdParty/gsmpi-1.2/
${CMAKE_SOURCE_DIR}/../ThirdParty/gsmpi-1.2/build
${CMAKE_SOURCE_DIR}/ThirdParty/dist/lib
${CMAKE_SOURCE_DIR}/../ThirdParty/dist/lib)
FIND_LIBRARY(XXT_LIBRARY NAMES xxt PATHS ${XXT_SEARCH_PATHS})
SET(XXT_FOUND FALSE)
IF (XXT_LIBRARY)
SET(XXT_FOUND TRUE)
MARK_AS_ADVANCED(XXT_LIBRARY)
ENDIF (XXT_LIBRARY)
IF (XXT_FOUND)
IF (NOT XXT_FIND_QUIETLY)
MESSAGE(STATUS "Found XXT")
ENDIF (NOT XXT_FIND_QUIETLY)
ELSE(XXT_FOUND)
IF (XXT_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find XXT")
ENDIF (XXT_FIND_REQUIRED)
ENDIF (XXT_FOUND)
......@@ -50,10 +50,6 @@ SET(Boost_LIBRARY_DIRS "@Boost_CONFIG_LIBRARY_DIR@")
SET(NEKTAR++_TP_LIBRARIES
${NEKTAR++_TP_LIBRARIES} ${Boost_LIBRARIES})
SET(LOKI_INCLUDE_DIRS "@LOKI_CONFIG_INCLUDE_DIR@")
SET(NEKTAR++_TP_INCLUDE_DIRS
${NEKTAR++_TP_INCLUDE_DIRS} ${LOKI_INCLUDE_DIRS})
SET(TINYXML_INCLUDE_DIRS "@TINYXML_CONFIG_INCLUDE_DIR@")
SET(NEKTAR++_TP_INCLUDE_DIRS
${NEKTAR++_TP_INCLUDE_DIRS} ${TINYXML_INCLUDE_DIRS})
......
MACRO(CHANGE_EXTENSION output var new_ext)
GET_FILENAME_COMPONENT(FileName ${var} NAME_WE)
GET_FILENAME_COMPONENT(Path ${var} PATH)
SET(${output} ${Path}/${FileName}.${new_ext})
##
## NektarCommon.cmake
##
## Frequently used Nektar++ CMake configuration macros and functions
##
#
# THIRDPARTY_LIBRARY(varname DESCRIPTION <description> [STATIC|SHARED] lib1 [lib2]...)
#
# Updates a variable containing the name of a third-party shared or static
# library to point to an absolute path defining its location instead of adding
# `-llibname` to the linker flags. This avoids the issue of e.g. linking against
# an outdated system zlib installation.
#
# Arguments:
# - `varname`: variable name containing the third-party library name. On
# output will be altered to update the correct path.
# - `DESCRIPTION`: a brief description of the variable (used in the SET
# command).
# - `SHARED`: if the library will be built as a shared library
# - `STATIC`: if the library will be built as a static library
#
MACRO(THIRDPARTY_LIBRARY varname)
CMAKE_PARSE_ARGUMENTS(TPLIB "" "DESCRIPTION" "STATIC;SHARED" ${ARGN})
IF(TPLIB_SHARED)
SET(LIBTYPE "SHARED")
SET(TPLIBS ${TPLIB_SHARED})
ELSEIF(TPLIB_STATIC)
SET(LIBTYPE "STATIC")
SET(TPLIBS ${TPLIB_STATIC})
ENDIF()
FOREACH (lib ${TPLIBS})
LIST(APPEND tmplist "${TPDIST}/lib/${CMAKE_${LIBTYPE}_LIBRARY_PREFIX}${lib}${CMAKE_${LIBTYPE}_LIBRARY_SUFFIX}")
ENDFOREACH()
SET(${varname} ${tmplist} CACHE FILEPATH ${TPLIB_DESCRIPTION} FORCE)
UNSET(tmplist)
UNSET(LIBTYPE)
UNSET(TPLIBS)
UNSET(TPLIB_SHARED)
UNSET(TPLIB_STATIC)
UNSET(lib)
ENDMACRO()
#
# SET_COMMON_PROPERTIES(target)
#
# Sets properties that are common to either library or executable targets. This
# includes:
#
# - Name suffixes: -g for debug, -ms for minsize, -rg for release w/debug.
# - Disable some MSVC compiler warnings
# - Add -pg flag if NEKTAR_ENABLE_PROFILE is switched on and we're using gcc
# - Add compiler definitions and appropriate warning levels to gcc-like
# compilers (e.g. clang)
# - Define versions for the target
# - Make sure that -fPIC is enabled for library code if building shared
# libraries.
#
# Arguments:
# - `target`: target name
#
MACRO(SET_COMMON_PROPERTIES name)
SET_TARGET_PROPERTIES(${name} PROPERTIES DEBUG_POSTFIX -g)
SET_TARGET_PROPERTIES(${name} PROPERTIES MINSIZEREL_POSTFIX -ms)
......@@ -18,8 +75,8 @@ MACRO(SET_COMMON_PROPERTIES name)
# warning)" warning (4800)
# 4250 - Inheritance via dominance. Nektar appears to be handling the
# diamond correctly.
# 4373 - Overriding a virtual method with parameters that differ by const
# or volatile conforms to the standard.
# 4373 - Overriding a virtual method with parameters that differ by const
# or volatile conforms to the standard.
# /Za is necessary to prevent temporaries being bound to reference
# parameters.
SET_TARGET_PROPERTIES(${name} PROPERTIES COMPILE_FLAGS
......@@ -29,14 +86,14 @@ MACRO(SET_COMMON_PROPERTIES name)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
ENDIF( MSVC )
IF( ${CMAKE_COMPILER_IS_GNUCXX} )
IF(NEKTAR_ENABLE_PROFILE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -pg")
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -pg")
IF (${CMAKE_COMPILER_IS_GNUCXX})
IF(NEKTAR_ENABLE_PROFILE)