Commit 4de0b3c6 authored by Chris Cantwell's avatar Chris Cantwell
Browse files

Merge branch 'fix/win7-modifications' into 'master'

Various fixes for Windows 7

This MR fixes a bunch of stuff for Windows 7 with Visual Studio 2013.

See merge request !391
parents d5dd4f16 dd083464
......@@ -132,38 +132,18 @@ OPTION(NEKTAR_USE_MEMORY_POOLS
"Use memory pools to accelerate memory allocation." ON)
MARK_AS_ADVANCED(NEKTAR_USE_MEMORY_POOLS)
# Turn on NEKTAR_USE_WIN32_LAPACK if we are in Windows and the libraries exist.
IF( WIN32 )
IF( CMAKE_CL_64 )
FIND_LIBRARY( WIN32_BLAS NAMES libblas64 PATHS ${CMAKE_SOURCE_DIR}/ThirdParty ${CMAKE_SOURCE_DIR}/../ThirdParty )
FIND_LIBRARY( WIN32_LAPACK NAMES liblapack64 PATHS ${CMAKE_SOURCE_DIR}/ThirdParty ${CMAKE_SOURCE_DIR}/../ThirdParty )
ELSE()
FIND_LIBRARY( WIN32_BLAS NAMES blas_win32 PATHS ${CMAKE_SOURCE_DIR}/ThirdParty ${CMAKE_SOURCE_DIR}/../ThirdParty )
FIND_LIBRARY( WIN32_LAPACK NAMES lapack_win32 PATHS ${CMAKE_SOURCE_DIR}/ThirdParty ${CMAKE_SOURCE_DIR}/../ThirdParty )
ENDIF()
IF (MSVC)
# Needed for M_PI to be visible in visual studio.
ADD_DEFINITIONS(-D_USE_MATH_DEFINES)
IF( WIN32_BLAS AND WIN32_LAPACK )
SET(Win32LapackDefault ON)
ELSE(WIN32_BLAS AND WIN32_LAPACK)
SET(Win32LapackDefault OFF)
ENDIF(WIN32_BLAS AND WIN32_LAPACK)
ELSE(WIN32)
SET(Win32LapackDefault OFF)
ENDIF(WIN32)
IF( MSVC )
# Needed for M_PI to be visible in visual studio.
ADD_DEFINITIONS(-D_USE_MATH_DEFINES)
# Removes the warnings about unsafe methods such as strcpy, std::copy,
# Removes the warnings about unsafe methods such as strcpy, std::copy,
# memcmp, etc.
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE)
ENDIF( )
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE)
ENDIF()
CMAKE_DEPENDENT_OPTION(NEKTAR_USE_WIN32_LAPACK
"Use Win32 Lapack provided with the Third Party Distribution."
${Win32LapackDefault} "NEKTAR_USE_BLAS_LAPACK; WIN32" OFF)
ON "NEKTAR_USE_BLAS_LAPACK; WIN32" OFF)
# Include Nektar++ common macros
INCLUDE (NektarCommon)
......
IF( WIN32 AND CMAKE_CL_64 )
FIND_LIBRARY( WIN32_BLAS NAMES libblas64 PATHS
${WIN32_LAPACK_ADDITIONAL_DIRS}
${CMAKE_SOURCE_DIR}/ThirdParty
${CMAKE_SOURCE_DIR}/../ThirdParty)
FIND_LIBRARY( WIN32_LAPACK NAMES liblapack64 PATHS
${WIN32_LAPACK_ADDITIONAL_DIRS}
${CMAKE_SOURCE_DIR}/ThirdParty
${CMAKE_SOURCE_DIR}/../ThirdParty)
ELSE()
FIND_LIBRARY( WIN32_BLAS NAMES blas_win32 PATHS
${WIN32_LAPACK_ADDITIONAL_DIRS}
${CMAKE_SOURCE_DIR}/ThirdParty
${CMAKE_SOURCE_DIR}/../ThirdParty)
FIND_LIBRARY( WIN32_LAPACK NAMES lapack_win32 PATHS
${WIN32_LAPACK_ADDITIONAL_DIRS}
${CMAKE_SOURCE_DIR}/ThirdParty
${CMAKE_SOURCE_DIR}/../ThirdParty)
ENDIF()
CHANGE_EXTENSION(WIN32_LAPACK_DLL ${WIN32_LAPACK} "dll")
CHANGE_EXTENSION(WIN32_BLAS_DLL ${WIN32_BLAS} "dll")
FIND_LIBRARY(WIN32_BLAS NAMES libblas PATHS ${TPSRC})
FIND_LIBRARY(WIN32_LAPACK NAMES liblapack PATHS ${TPSRC})
IF (NOT WIN32_BLAS OR NOT WIN32_LAPACK)
IF (CMAKE_CL64)
SET(WIN_ZIP_FILE "win64-blas-lapack.zip")
SET(WIN_ZIP_MD5_VALUE "b5ad4f7335ca964bbdafab129e44a046")
SET(WIN_ZIP_SHA1_VALUE "adb331fa195db264e95e46b902887f12971dbf48")
SET(WIN_ZIP_SHA256_VALUE "0e6e3360cdf577718ee57a6fd27c47bac0391d3c7d373e29a0352505e1dc912b")
ELSE()
SET(WIN_ZIP_FILE "win32-blas-lapack.zip")
SET(WIN_ZIP_MD5_VALUE "6dbf9cced1fb73cc093ccc6560cb46e2")
SET(WIN_ZIP_SHA1_VALUE "39c5deaf17211a5012ccfd9d0258da04a7ceb197")
SET(WIN_ZIP_SHA256_VALUE "6bb347aa717530fa74b71539f331bb4027767d8b25b8a26c741b540c73398a03")
ENDIF()
SET(WIN_ZIP_PATH ${TPSRC}/${WIN_ZIP_FILE})
IF (NOT EXISTS ${WIN_ZIP_PATH})
FILE(DOWNLOAD ${TPURL}/${WIN_ZIP_FILE} ${WIN_ZIP_PATH})
ENDIF()
# Calculate expected MD5 and SHA128 hashes
FILE (MD5 ${WIN_ZIP_PATH} WIN_ZIP_MD5)
FILE (SHA1 ${WIN_ZIP_PATH} WIN_ZIP_SHA1)
FILE (SHA256 ${WIN_ZIP_PATH} WIN_ZIP_SHA256)
STRING(TOLOWER "${WIN_ZIP_MD5}" WIN_ZIP_MD5)
STRING(TOLOWER "${WIN_ZIP_SHA1}" WIN_ZIP_SHA1)
STRING(TOLOWER "${WIN_ZIP_SHA256}" WIN_ZIP_SHA256)
IF ((NOT WIN_ZIP_MD5 STREQUAL WIN_ZIP_MD5_VALUE) OR
(NOT WIN_ZIP_SHA1 STREQUAL WIN_ZIP_SHA1_VALUE) OR
(NOT WIN_ZIP_SHA256 STREQUAL WIN_ZIP_SHA256_VALUE))
MESSAGE(FATAL_ERROR "Security error: Win32 BLAS/LAPACK file has "
"MD5, SHA1 or SHA256 hash")
ENDIF()
EXECUTE_PROCESS(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${WIN_ZIP_PATH}
WORKING_DIRECTORY ${TPSRC}
)
# For some reason CMake refuses to run FIND_LIBRARY again so we
# force this to the correct library.
SET(WIN32_BLAS "${TPSRC}/libblas.lib" CACHE FILEPATH "Blas" FORCE)
SET(WIN32_LAPACK "${TPSRC}/liblapack.lib" CACHE FILEPATH "LAPACK" FORCE)
IF (NOT WIN32_BLAS)
MESSAGE(FATAL_ERROR "Could not find BLAS library after unzipping!")
ENDIF()
IF (NOT WIN32_LAPACK)
MESSAGE(FATAL_ERROR "Could not find LAPACK library after unzipping!")
ENDIF()
ENDIF ()
GET_FILENAME_COMPONENT(LAPACK_DIR ${WIN32_LAPACK} PATH CACHE)
LINK_DIRECTORIES(${LAPACK_DIR})
IF (WIN32_BLAS)
SET(WIN32_LAPACK_FOUND ON)
ENDIF (WIN32_BLAS)
IF (WIN32_LAPACK_FOUND)
IF (NOT WIN32_LAPACK_FIND_QUIETLY)
MESSAGE(STATUS "Found WIN32 Lapack: ${WIN32_LAPACK}")
ENDIF (NOT WIN32_LAPACK_FIND_QUIETLY)
ELSE(WIN32_LAPACK_FOUND)
IF (WIN32_LAPACK_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find Win32 Lapack")
ENDIF (WIN32_LAPACK_FIND_REQUIRED)
ENDIF (WIN32_LAPACK_FOUND)
MESSAGE(STATUS "Found Win32 BLAS: ${WIN32_BLAS}")
MESSAGE(STATUS "Found Win32 Lapack: ${WIN32_LAPACK}")
\ No newline at end of file
......@@ -3,26 +3,41 @@ SET(Boost_USE_MULTITHREADED ON CACHE BOOL
"Search for multithreaded boost libraries")
MARK_AS_ADVANCED(Boost_USE_MULTITHREADED)
IF (WIN32)
ADD_DEFINITIONS("-DBOOST_ALL_NO_LIB")
ENDIF()
IF (THIRDPARTY_BUILD_BOOST)
INCLUDE(ExternalProject)
# Only build the libraries we need
SET(BOOST_LIB_LIST --with-system --with-iostreams --with-filesystem
--with-program_options --with-date_time --with-thread
--with-regex)
IF (NOT WIN32)
# Only build the libraries we need
SET(BOOST_LIB_LIST --with-system --with-iostreams --with-filesystem
--with-program_options --with-date_time --with-thread
--with-regex)
# We need -fPIC for 64-bit builds
IF( CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" )
SET(BOOST_FLAGS cxxflags=-fPIC cflags=-fPIC linkflags=-fPIC)
ENDIF ()
# Build Boost
IF (APPLE)
SET(TOOLSET darwin)
ELSE(APPLE)
SET(TOOLSET gcc)
ENDIF(APPLE)
ENDIF()
# Build Boost
IF (APPLE)
SET(TOOLSET darwin)
ELSEIF (WIN32)
IF (MSVC10)
SET(TOOLSET msvc-10.0)
ELSEIF (MSVC11)
SET(TOOLSET msvc-11.0)
ELSEIF (MSVC12)
SET(TOOLSET msvc-12.0)
ENDIF()
ELSE(APPLE)
SET(TOOLSET gcc)
ENDIF(APPLE)
IF (NOT WIN32)
EXTERNALPROJECT_ADD(
boost
PREFIX ${TPSRC}
......@@ -36,70 +51,85 @@ IF (THIRDPARTY_BUILD_BOOST)
INSTALL_DIR ${TPDIST}
CONFIGURE_COMMAND CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} ./bootstrap.sh --prefix=${TPDIST}
BUILD_COMMAND NO_BZIP2=1 ./b2
variant=release
link=shared
include=${TPDIST}/include
linkflags="-L${TPDIST}/lib"
${BOOST_FLAGS} ${BOOST_LIB_LIST}
--layout=system toolset=${TOOLSET} install
variant=release
link=shared
include=${TPDIST}/include
linkflags="-L${TPDIST}/lib"
${BOOST_FLAGS} ${BOOST_LIB_LIST}
--layout=system toolset=${TOOLSET} install
INSTALL_COMMAND ""
)
IF (APPLE)
EXTERNALPROJECT_ADD_STEP(boost patch-install-path
COMMAND sed -i ".bak" "s|-install_name \"|&${TPDIST}/lib/|" ${TPSRC}/boost/tools/build/v2/tools/darwin.jam
DEPENDERS build
DEPENDEES download)
ENDIF (APPLE)
# If building ThirdParty zlib, force zlib build before boost
IF (THIRDPARTY_BUILD_ZLIB)
ADD_DEPENDENCIES(boost zlib-1.2.7)
ENDIF(THIRDPARTY_BUILD_ZLIB)
# Set up CMake variables
SET(Boost_DATE_TIME_LIBRARY boost_date_time)
SET(Boost_DATE_TIME_LIBRARY_DEBUG boost_date_time)
SET(Boost_DATE_TIME_LIBRARY_RELEASE boost_date_time)
SET(Boost_FILESYSTEM_LIBRARY boost_filesystem)
SET(Boost_FILESYSTEM_LIBRARY_DEBUG boost_filesystem)
SET(Boost_FILESYSTEM_LIBRARY_RELEASE boost_filesystem)
SET(Boost_IOSTREAMS_LIBRARY boost_iostreams)
SET(Boost_IOSTREAMS_LIBRARY_DEBUG boost_iostreams)
SET(Boost_IOSTREAMS_LIBRARY_RELEASE boost_iostreams)
SET(Boost_PROGRAM_OPTIONS_LIBRARY boost_program_options)
SET(Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG boost_program_options)
SET(Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE boost_program_options)
SET(Boost_REGEX_LIBRARY boost_regex)
SET(Boost_REGEX_LIBRARY_DEBUG boost_regex)
SET(Boost_REGEX_LIBRARY_RELEASE boost_regex)
SET(Boost_SYSTEM_LIBRARY boost_system)
SET(Boost_SYSTEM_LIBRARY_DEBUG boost_system)
SET(Boost_SYSTEM_LIBRARY_RELEASE boost_system)
SET(Boost_THREAD_LIBRARY boost_thread)
SET(Boost_THREAD_LIBRARY_DEBUG boost_thread)
SET(Boost_THREAD_LIBRARY_RELEASE boost_thread)
SET(Boost_INCLUDE_DIRS ${TPSRC}/dist/include
${TPSRC}/dist/include/boost-1_49)
SET(Boost_LIBRARY_DIRS ${TPSRC}/dist/lib)
LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
)
ELSE ()
IF (CMAKE_CL_64)
SET(ADDRESS_MODEL 64)
ELSE()
SET(ADDRESS_MODEL 32)
ENDIF()
EXTERNALPROJECT_ADD(
boost
PREFIX ${TPSRC}
URL ${TPURL}/boost_1_55_0.tar.bz2
URL_MD5 "d6eef4b4cacb2183f2bf265a5a03a354"
STAMP_DIR ${TPSRC}/stamp
STAMP_DIR ${TPBUILD}/stamp
DOWNLOAD_DIR ${TPSRC}
SOURCE_DIR ${TPSRC}/boost
SOURCE_DIR ${TPBUILD}/boost
BINARY_DIR ${TPBUILD}/boost
TMP_DIR ${TPBUILD}/boost-tmp
INSTALL_DIR ${TPDIST}
CONFIGURE_COMMAND bootstrap.bat --prefix=${TPDIST}/boost
BUILD_COMMAND b2 --layout=system install
CONFIGURE_COMMAND call bootstrap.bat
BUILD_COMMAND b2 variant=release
toolset=${TOOLSET}
address-model=${ADDRESS_MODEL}
link=shared
runtime-link=shared
-s NO_BZIP2=1
-s ZLIB_BINARY=zlib
-s ZLIB_INCLUDE=${TPDIST}/include
-s ZLIB_LIBPATH=${TPDIST}/lib
${BOOST_LIB_LIST}
--layout=system
--prefix=${TPDIST} install
INSTALL_COMMAND ""
)
ENDIF ()
)
ENDIF()
IF (APPLE)
EXTERNALPROJECT_ADD_STEP(boost patch-install-path
COMMAND sed -i ".bak" "s|-install_name \"|&${TPDIST}/lib/|" ${TPSRC}/boost/tools/build/v2/tools/darwin.jam
DEPENDERS build
DEPENDEES download)
ENDIF (APPLE)
# If building ThirdParty zlib, force zlib build before boost
IF (THIRDPARTY_BUILD_ZLIB)
ADD_DEPENDENCIES(boost zlib-1.2.7)
ENDIF(THIRDPARTY_BUILD_ZLIB)
# Set up CMake variables
SET(Boost_DATE_TIME_LIBRARY boost_date_time)
SET(Boost_DATE_TIME_LIBRARY_DEBUG boost_date_time)
SET(Boost_DATE_TIME_LIBRARY_RELEASE boost_date_time)
SET(Boost_FILESYSTEM_LIBRARY boost_filesystem)
SET(Boost_FILESYSTEM_LIBRARY_DEBUG boost_filesystem)
SET(Boost_FILESYSTEM_LIBRARY_RELEASE boost_filesystem)
SET(Boost_IOSTREAMS_LIBRARY boost_iostreams)
SET(Boost_IOSTREAMS_LIBRARY_DEBUG boost_iostreams)
SET(Boost_IOSTREAMS_LIBRARY_RELEASE boost_iostreams)
SET(Boost_PROGRAM_OPTIONS_LIBRARY boost_program_options)
SET(Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG boost_program_options)
SET(Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE boost_program_options)
SET(Boost_REGEX_LIBRARY boost_regex)
SET(Boost_REGEX_LIBRARY_DEBUG boost_regex)
SET(Boost_REGEX_LIBRARY_RELEASE boost_regex)
SET(Boost_SYSTEM_LIBRARY boost_system)
SET(Boost_SYSTEM_LIBRARY_DEBUG boost_system)
SET(Boost_SYSTEM_LIBRARY_RELEASE boost_system)
SET(Boost_THREAD_LIBRARY boost_thread)
SET(Boost_THREAD_LIBRARY_DEBUG boost_thread)
SET(Boost_THREAD_LIBRARY_RELEASE boost_thread)
SET(Boost_INCLUDE_DIRS ${TPSRC}/dist/include)
SET(Boost_LIBRARY_DIRS ${TPSRC}/dist/lib)
LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
ELSE (THIRDPARTY_BUILD_BOOST)
ADD_CUSTOM_TARGET(boost ALL)
SET(Boost_DEBUG 0)
......
......@@ -6,8 +6,8 @@ IF (THIRDPARTY_BUILD_METIS)
EXTERNALPROJECT_ADD(
modmetis-5.1.0
PREFIX ${TPSRC}
URL ${TPURL}/modmetis-5.1.0_1.tar.bz2
URL_MD5 "6c6816aea0f53db6c71b1d98ed4ad42b"
URL ${TPURL}/modmetis-5.1.0_2.tar.bz2
URL_MD5 "8a1f1afd39b46a4477c1ea15464cdf89"
STAMP_DIR ${TPBUILD}/stamp
DOWNLOAD_DIR ${TPSRC}
SOURCE_DIR ${TPSRC}/modmetis-5.1.0
......
......@@ -95,7 +95,7 @@ Open a terminal.
If you have downloaded the tarball, first unpack it:
\begin{lstlisting}[style=BashInputStyle]
tar -zxvf nektar++-4.0.0.tar.gz
tar -zxvf nektar++-\nekver.tar.gz
\end{lstlisting}
Change into the \inlsh{nektar++} source code directory
\begin{lstlisting}[style=BashInputStyle]
......@@ -109,7 +109,7 @@ From a terminal:
\begin{enumerate}
\item If you have downloaded the tarball, first unpack it
\begin{lstlisting}[style=BashInputStyle]
tar -zxvf nektar++-4.0.0.tar.gz
tar -zxvf nektar++-\nekver.tar.gz
\end{lstlisting}
\item Change into the source-code directory, create a \inltt{build}
......@@ -185,7 +185,7 @@ From a terminal:
\end{lstlisting}
\end{enumerate}
\subsection{OSX}
\subsection{OS X}
\subsubsection{Prerequisites}
\nekpp uses a number of external programs and libraries for some or all of its
......@@ -197,13 +197,12 @@ compiled for use with Nektar++ \emph{automatically} (but not installed
system-wide).
\begin{notebox}
To compile \nekpp on OSX, Apple's Xcode Developer Tools must be installed. They
can be installed either from the App Store (only on Mac OS 10.7 and above) or
downloaded directly from
\href{http://connect.apple.com/}{http://connect.apple.com/}
(you are required to have an Apple Developer Connection account).
Xcode includes Apple implementations of BLAS and LAPACK (called the Accelerate
Framework).
To compile \nekpp on OS X, Apple's Xcode Developer Tools must be
installed. They can be installed either from the App Store (only on Mac OS
10.7 and above) or downloaded directly from
\href{http://connect.apple.com/}{http://connect.apple.com/} (you are required
to have an Apple Developer Connection account). Xcode includes Apple
implementations of BLAS and LAPACK (called the Accelerate Framework).
\end{notebox}
\begin{center}
......@@ -262,7 +261,7 @@ Open a terminal (Applications->Utilities->Terminal).
If you have downloaded the tarball, first unpack it:
\begin{lstlisting}[style=BashInputStyle]
tar -zxvf nektar++-4.0.0.tar.gz
tar -zxvf nektar++-\nekver.tar.gz
\end{lstlisting}
Change into the \inlsh{nektar++} source code directory
\begin{lstlisting}[style=BashInputStyle]
......@@ -276,7 +275,7 @@ From a terminal (Applications->Utilities->Terminal):
\begin{enumerate}
\item If you have downloaded the tarball, first unpack it
\begin{lstlisting}[style=BashInputStyle]
tar -zxvf nektar++-4.0.0.tar.gz
tar -zxvf nektar++-\nekver.tar.gz
\end{lstlisting}
\item Change into the source-code directory, create a \inltt{build}
......@@ -350,170 +349,111 @@ From a terminal (Applications->Utilities->Terminal):
\end{lstlisting}
\end{enumerate}
\subsection{Windows}
The following software must be pre-installed on your system:
\begin{itemize}
\item Microsoft Visual Studio 2008
\begin{itemize}
\item Visual Studio 2008 Service Pack 1 is required
\end{itemize}
\item Python Compiler 2.7.2+ (download from
\url{http://www.http//python.org/download/})
\item CMake 2.8.7+ (download from \url{http://www.cmake.org/HTML/index.html})
\begin{itemize}
\item When prompted, select the option to add CMake to the system PATH.
\end{itemize}
\item WinRAR (download from \url{http://www.rarlab.com/download.htm})
\end{itemize}
\newcommand{\nekver}{\input{../../VERSION}}
\subsubsection{Unpack the tarballs}
\begin{itemize}
\item Unpack the \inlsh{nektar++-\nekver.tar.gz} file using
WinRAR
\item Create a \inlsh{ThirdParty} directory within the
\inlsh{nektar++-\nekver} subdirectory.
\begin{notebox}
Some windows version do not
recognise the path of a folder which has '++' in the name. If you think that
your windows version can not handle path containing special characters, you
should rename \inlsh{nektar++-\nekver} to
\inlsh{nektar-\nekver}.
\end{notebox}
\end{itemize}
\subsubsection{Building ThirdParty libraries}
Download ThirdParty packages from \inlsh{www.nektar.info/thirdparty} as requried
below.
\begin{itemize}
\item \textbf{TinyXML} Extract the \inlsh{tinyxml\_2\_4\_3.zip} archive into
the ThirdParty directory using WinRAR. This will create a \inlsh{tinyxml}
sub-directory.
\item \textbf{Loki} Extract the \inlsh{loki-0.1.3.tar.bz2} archive into the
ThirdParty directory using WinRAR. This will create a \inlsh{loki-0.1.3}
sub-directory.
\item \textbf{Mod-METIS} Extract the \inlsh{modmetis-4.0.tar.bz2} archive
into the ThirdParty directory using WinRAR. This will create a
\inlsh{modmetis-4.0} sub-directory.
\begin{itemize}
\item Open a command-line terminal and change to
\inlsh{ThirdParty\textbackslash modmetis-4.0\textbackslash build}.
\item Run
\begin{lstlisting}[style=BashInputStyle]
cmake ..\
vcbuild "ModifiedMetis.sln"
vcbuild "INSTALL.vcproj"
\end{lstlisting}
\end{itemize}
\item \textbf{NIST SparseBLAS} Extract the \inlsh{spblastk0.9b} archive
into the ThirdParty directory using WinRAR. This will create a
\inlsh{spblastk0.9b} sub-directory.
\begin{itemize}
\item From a command-line terminal change to
\inlsh{ThirdParty\textbackslash spblastk0.9b\textbackslash build}.
\item Run
\begin{lstlisting}[style=BashInputStyle]
cmake ..\
vcbuild "NistSparseBlasToolkit.sln"
vcbuild "INSTALL.vcproj"
\end{lstlisting}
\end{itemize}
\item \textbf{BLAS/LAPACK} Extract the \inlsh{blaslapack-dll.zip} archive
into the ThirdParty directory using WinRAR. This will create
\inlsh{blas\_win32.*} and \inlsh{lapack\_win32.*} files in the ThirdParty
directory.
\item \textbf{ZLib} Extract the \inlsh{zlib-1.2.3.tar.bz2} archive using
WinRAR. This will create a \inlsh{zlib-1.2.3} sub-directory.
Windows compilation is supported, but the build process is somewhat convoluted
at present. As such, only serial execution is supported with a minimal amount of
additional build packages. These can either be installed by the user, or
automatically in the build process.
\item \textbf{Boost} Extract the \inlsh{boost\_1\_49\_0.tar.bz2} archive using
WinRAR. This will create a {{{boost\_1\_49\_0}}} sub-directory.
\begin{itemize}
\item Open a command-line terminal and change to the \inlsh{boost\_1\_49\_0}
directory and run:
\begin{lstlisting}[style=BashInputStyle]
bootstrap.bat
b2.exe -s ZLIB_SOURCE=..\..\..\..\zlib-1.2.3 \
--prefix=..\boost toolset=msvc-9.0 install
\end{lstlisting}
\end{itemize}
\begin{notebox}
Boost might not be able to find the \inlsh{zlib-1.2.3} directory specified
by the relative path in the command line above. If this happens, you can
replace the relative path with the absolute path of the \inlsh{zlib-1.2.3}
directory (surround it in quotes).
\end{notebox}
\end{itemize}
\subsubsection{Building Nektar++}
Change to the \inlsh{nektar++-\nekver\textbackslash builds} directory.
\begin{lstlisting}[style=BashInputStyle]
cmake ..\
vcbuild "Nektar++.sln"
vcbuild "INSTALL.vcproj"
\end{lstlisting}
To modify the default configuration use \inlsh{cmake -i ..\textbackslash} or use
the CMake-gui application.
\subsubsection{Notes on building on windows 7 64 bit with Visual Studio 10}
To get a build working on a windows 7 64 bit machine with VS10, the following
modifications were helpful or necessary:
\begin{itemize}
\item Instead of vcbuild (which doesn't exist in VS10) use msbuild.
\item You may need to run \\ \inlsh{C:\textbackslash Program Files
(x86)\textbackslash Microsoft Visual Studio 10.0\textbackslash
VC\textbackslash vcvarsall.bat} \\ first to set up some registry entries to run
msbuild.
Try without first.
\item You will probably wish to put msbuild into your path
\item project files created by cmake are likely to have the extension .vcxproj
rather than .vcproj.
\item When running b2.exe, provide the full path to zlib. Not doing so will only
cause an error later when running cmake for Nektar++
\item When running b2.exe, use toolset=msvc-10.0 instead of toolset=msvc-9.0
\item When using cmake for nektar++, it is helpful to use the cmake gui
\item Using the cmake gui, set the BOOST\_ROOT variable to the appropriate path
for boost * Set Boost\_USE\_STATIC\_LIBS = ON (I did this by editing
CMakeLists.txt, but setting it from the gui should work)
\item When running msbuild "Nektar++.sln" I got error can't find zlib.lib. As a
workaround, copy the files zlibd.lib (two of them) and rename the copies zlib.lib.
However, I believe these are the debug builds, so it would be better to work
out how to build in release mode.
\item At this stage, when running msbuild "Nektar++.sln", I got boost link
errors.
To fix them, look for the line
\begin{lstlisting}[style=BashInputStyle]
ADD_DEFINITIONS(-DBOOST_ALL_NO_LIB -DBOOST_PROGRAM_OPTIONS_DYN_LINK \
-DBOOST_IOSTREAMS_DYN_LINK -DBOOST_THREAD_DYN_LINK)
\end{lstlisting}
in the \inlsh{CMakeLists.txt} file and comment it out (and run cmake again)
\item At this point, when building Nektar, linking against boost is fine, but I
got a compile error in TestData.cpp. This could be fixed by editing TestData.cpp
and replacing the line
\begin{lstlisting}
m_doc = new TiXmlDocument(pFilename.file_string().c_str());
\end{lstlisting}
with
\begin{lstlisting}
m_doc =new TiXmlDocument(pFilename.string().c_str());
\end{lstlisting}
\end{itemize}
\begin{center}
\begin{tabular}{lcccl}
\toprule
& & \multicolumn{2}{c}{Installation} & \\ \cmidrule(r){3-4}
Package & Req. & User & Auto. & Note \\
\midrule
MS Visual Studio & \cmark & \cmark & & 2012 and 2013 known working\\
CMake $\geq 3.0$ & \cmark & \cmark & & \\
BLAS & \cmark & \cmark & \cmark & \\
LAPACK & \cmark & \cmark & \cmark & \\
Boost $\geq 1.55$ & \cmark & \cmark & \cmark & Compile with iostreams\\
ModMETIS & \cmark & \cmark & \cmark & \\
\bottomrule
\end{tabular}
\end{center}
\begin{notebox}
The step of building INSTALL.vcproj causes executables and dlls to be copied
into a directory \inlsh{<path>\textbackslash
nektar\textbackslash builds-test\textbackslash dist\textbackslash bin}.
The executables should be run from here so that they can find the dlls they need.
\end{notebox}
\subsubsection{Detailed instructions}
If you wish to put a breakpoint in to step through Nektar++, you may need to run
from the folder the executable was built in so that the pdb files are in the
expected place. Then a workaround is to copy the dlls into that folder.
\begin{enumerate}
\item Install Microsoft Visual Studio 2013 (preferred) or 2012 (known to
work). This can be obtained from Microsoft free of charge by using their
Express developer tools from
\url{http://www.visualstudio.com/en-us/products/visual-studio-express-vs.aspx}.
\item Install WinRAR from \url{http://www.rarlab.com/download.htm}.
\item Install CMake 3.0+ from \url{http://www.cmake.org/download/}. When
prompted, select the option to add CMake to the system PATH.
\item (Optional) Install Git from \url{http://git-scm.com/download/win} to use
the development versions of \nekpp. When prompted, select the option to add
Git to the system PATH. You do not need to select the option to add Unix tools
to the PATH.
\item (Optional) If you do not wish to build boost during the compilation
process (which can take some time), then boost binaries can be found at
\url{http://sourceforge.net/projects/boost/files/boost-binaries/1.55.0-build2/}. By
default these install into \inlsh{C:\textbackslash local\textbackslash
boost\_1\_55\_0}. If you use these libraries, you will need to:
\begin{itemize}
\item Rename \texttt{libs-msvc12.0} to \texttt{lib}
\item Inside the \texttt{lib} directory, create duplicates of
\texttt{boost\_zlib.dll} and \texttt{boost\_bzip2.dll} called