[cig-commits] commit 2387 by bangerth to /var/svn/dealii/aspect

dealii.demon at gmail.com dealii.demon at gmail.com
Mon Mar 31 11:54:20 PDT 2014


Revision 2387

Pass down the build directory to the files being built.

U   trunk/aspect/CMakeLists.txt
U   trunk/aspect/doc/modules/changes.h


http://www.dealii.org/websvn/revision.php?repname=Aspect+Repository&path=%2F&rev=2387&peg=2387

Diff:
Modified: trunk/aspect/CMakeLists.txt
===================================================================
--- trunk/aspect/CMakeLists.txt	2014-03-31 18:52:39 UTC (rev 2386)
+++ trunk/aspect/CMakeLists.txt	2014-03-31 18:54:18 UTC (rev 2387)
@@ -63,6 +63,15 @@
 PROJECT(${TARGET})
 
 
+# Pass down the source directory to the sources. This can be used
+# to hard-code the location of data files, such as in
+# $ASPECT_SOURCE_DIR/data/velocity-boundary-conditions/gplates/*
+FOREACH(_source_file ${TARGET_SRC})
+  SET_PROPERTY(SOURCE ${_source_file}
+    APPEND PROPERTY COMPILE_DEFINITIONS ASPECT_SOURCE_DIR="${CMAKE_SOURCE_DIR}")
+ENDFOREACH()
+
+
 # Configure a cmake fragment that plugins can use to
 # set up compiler flags, include paths, etc to compile an
 # Aspect plugin

Modified: trunk/aspect/doc/modules/changes.h
===================================================================
--- trunk/aspect/doc/modules/changes.h	2014-03-31 18:52:39 UTC (rev 2386)
+++ trunk/aspect/doc/modules/changes.h	2014-03-31 18:54:18 UTC (rev 2387)
@@ -8,6 +8,15 @@
 </p>
 
 <ol>
+  <li>New: CMake now passes down a preprocessor defined string constant
+  called <code>ASPECT_SOURCE_DIR</code> that is set to the (top level)
+  directory in which the ASPECT sources are located. This can be used
+  by plugins to locate where data files are (e.g., in the <code>data/</code>
+  directory of the source tree) independent of where the executable is
+  finally called.
+  <br>
+  (Wolfgang Bangerth, 2014/03/31)
+
   <li>Changed: The 'radial constant' gravity model had a default of
   $30 m/s^2$ for the magnitude of the gravity. This value makes no
   sense. It has therefore been changed to the value we have at
@@ -19,7 +28,8 @@
   <br>
   (Timo Heister, 2014/03/26)
 
-  <li>Fixed: Corrected calculation of non-dimensional temperature.
+  <li>Fixed: Corrected calculation of non-dimensional temperature in the
+  temperature statistics postprocessor plugin.
   <br>
   (Eric Heien, 2014/03/24)
 


More information about the CIG-COMMITS mailing list