<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://fluid.colorado.edu/wiki/index.php?action=history&amp;feed=atom&amp;title=Adding_CMAKE_To_PHASTA</id>
		<title>Adding CMAKE To PHASTA - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://fluid.colorado.edu/wiki/index.php?action=history&amp;feed=atom&amp;title=Adding_CMAKE_To_PHASTA"/>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=Adding_CMAKE_To_PHASTA&amp;action=history"/>
		<updated>2026-05-13T19:14:45Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=Adding_CMAKE_To_PHASTA&amp;diff=330&amp;oldid=prev</id>
		<title>Jema6380 at 18:19, 11 July 2013</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=Adding_CMAKE_To_PHASTA&amp;diff=330&amp;oldid=prev"/>
				<updated>2013-07-11T18:19:18Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 18:19, 11 July 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l47&quot; &gt;Line 47:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 47:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you have any problems with this process, feel free to email [[mailto:Benjamin.A.MatthewsATcolorado.edu Ben]] and please share any lessons learned on this page.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you have any problems with this process, feel free to email [[mailto:Benjamin.A.MatthewsATcolorado.edu Ben]] and please share any lessons learned on this page.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Creating geom.spj]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jema6380</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=Adding_CMAKE_To_PHASTA&amp;diff=329&amp;oldid=prev</id>
		<title>Matthb2 at 03:45, 2 July 2013</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=Adding_CMAKE_To_PHASTA&amp;diff=329&amp;oldid=prev"/>
				<updated>2013-07-02T03:45:10Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 03:45, 2 July 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l46&quot; &gt;Line 46:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 46:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;There is a (slightly outdated) video showing this process on an arbitrary fork of PHASTA available [[http://fluid.colorado.edu/~matthb2/videos/phastatocmake/ here]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;There is a (slightly outdated) video showing this process on an arbitrary fork of PHASTA available [[http://fluid.colorado.edu/~matthb2/videos/phastatocmake/ here]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you have any problems with this process, feel free to email [[mailto:Benjamin.A.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Matthews AT colorado&lt;/del&gt;.edu Ben]] and please share any lessons learned on this page.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you have any problems with this process, feel free to email [[mailto:Benjamin.A.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;MatthewsATcolorado&lt;/ins&gt;.edu Ben]] and please share any lessons learned on this page.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Matthb2</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=Adding_CMAKE_To_PHASTA&amp;diff=328&amp;oldid=prev</id>
		<title>Matthb2: Created page with &quot;If you'd like to use the new CMake based build system as described on the Compiling PHASTA With CMake page, but haven't merged your copy with [[https://redmine.scorec.rpi.edu...&quot;</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=Adding_CMAKE_To_PHASTA&amp;diff=328&amp;oldid=prev"/>
				<updated>2013-07-02T03:44:08Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;If you&amp;#039;d like to use the new CMake based build system as described on the &lt;a href=&quot;/wiki/index.php/Compiling_PHASTA_With_CMake&quot; class=&quot;mw-redirect&quot; title=&quot;Compiling PHASTA With CMake&quot;&gt;Compiling PHASTA With CMake&lt;/a&gt; page, but haven&amp;#039;t merged your copy with [[https://redmine.scorec.rpi.edu...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;If you'd like to use the new CMake based build system as described on the [[Compiling PHASTA With CMake]] page, but haven't merged your copy with [[https://redmine.scorec.rpi.edu/anonsvn/phasta SVN trunk]] recently, you can follow these steps to add CMake support to your fork. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First, download the CMake build scripts:&lt;br /&gt;
&lt;br /&gt;
  git clone https://github.com/matthb2/phasta-buildsystem.git&lt;br /&gt;
  &lt;br /&gt;
Next, we'll re-arrange your checkout of PHASTA to remove any redundant directories&lt;br /&gt;
&lt;br /&gt;
  cd phasta&lt;br /&gt;
  mv phSolver tmp&lt;br /&gt;
  mv tmp/phSolver ./&lt;br /&gt;
  rmdir tmp&lt;br /&gt;
  #and so on with each directory that you have&lt;br /&gt;
&lt;br /&gt;
Once that's done, you'll need to copy all the CMakeLists.txt files into their respective directories:&lt;br /&gt;
  #starting from your phasta source directory:&lt;br /&gt;
  for i in `find ../phasta-buildsystem -name 'CMakeLists.txt' | sed 's:\.\.\/::g' | sed 's:CMakeLists.txt$::g' | sed 's:^phasta\-buildsystem\/::g'`; do cp ../phasta-buildsystem/$i/CMakeLists.txt ./$i/&lt;br /&gt;
&lt;br /&gt;
From this point, if you're on a fairly normal system, you can probably just build using CMake. That said, if you want your setup to be robust, it's a good idea to make some minor code changes in order to allow CMake to compute the necessary name mangling for the Fortran callable C functions. &lt;br /&gt;
&lt;br /&gt;
CMake will generate a header file called &amp;quot;FCMangle.h&amp;quot; which supplies some macros. The one we're interested in is called &lt;br /&gt;
  FortranCInterface_GLOBAL_()&lt;br /&gt;
This macro takes two arguments, both of which are the name of the global symbol that should be Fortran callable. The first argument should be all lowercase, and the second should be all uppercase. The macro returns the Fortran name of the symbol.&lt;br /&gt;
&lt;br /&gt;
For example, if I have a C function &amp;quot;foo()&amp;quot; that I want to call from Fortran, in my C header, I'd add these lines:&lt;br /&gt;
  #include &amp;lt;FCMangle.h&amp;gt;&lt;br /&gt;
  #define foo FortranCInterface_GLOBAL_(foo,FOO)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To take advantage of this in PHASTA, you'll find blocks of code that look like:&lt;br /&gt;
&lt;br /&gt;
  #ifdef ibm&lt;br /&gt;
  #define something&lt;br /&gt;
  #endif&lt;br /&gt;
  #ifdef aix&lt;br /&gt;
  #define something&lt;br /&gt;
  #endif&lt;br /&gt;
&lt;br /&gt;
Which should be replaced by calls to FortranCInterface_GLOBAL_. I've found that grepping for &amp;quot;ibm&amp;quot; catches most of these. If you fail to update any of these pieces of code, you'll see linker errors on certain platforms. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that to avoid another second class of bug, we've also been removing the trailing underscores from any functions that have them. For example &amp;quot;readheader_()&amp;quot; becomes &amp;quot;readheader()&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There is a (slightly outdated) video showing this process on an arbitrary fork of PHASTA available [[http://fluid.colorado.edu/~matthb2/videos/phastatocmake/ here]]&lt;br /&gt;
&lt;br /&gt;
If you have any problems with this process, feel free to email [[mailto:Benjamin.A.Matthews AT colorado.edu Ben]] and please share any lessons learned on this page.&lt;/div&gt;</summary>
		<author><name>Matthb2</name></author>	</entry>

	</feed>