Difference between revisions of "PHASTA/Compiling PHASTA With CMake"
(Created page with "There is an unofficial, but popular version of the PHASTA solver which uses a http://cmake.org CMake based build system. Generally, an out-of-source build is used, meaning th...") |
(No difference)
|
Revision as of 17:04, 20 June 2013
There is an unofficial, but popular version of the PHASTA solver which uses a [CMake] based build system. Generally, an out-of-source build is used, meaning that you have a separate directory for your executables and intermediate files.
Assuming you have your desired compiler and a current version of CMake (2.8.5 or newer) in your path, you must first create and change into an empty directory to store your build
mkdir build cd build
You can then run cmake to create your makefile
If you're using the Intel compiler suite:
CC=icc CXX=icpc FC=ifort ccmake ../phasta
If you're using the PGI compiler suite:
CC=pgcc CXX=pgCC FC=pgfortran ccmake ../phasta
IF you're using the GNU toolchain:
CC=gcc CXX=g++ FC=gfortran ccmake ../phasta
This will open a "GUI" of sorts. You can use the arrow keys to navigate. Press enter to edit the highlighted field, and then enter again to save your change. Press the "c" key to compute the options. Press "g" to write out the makefile and quit. You'll need to press "c" several times, and fill in any desired options before you can generate your makefile.
You may want to set the "CMAKE_BUILD_TYPE" field to either "Release" or "Debug" to get an optimized build or a debugable build respectively.