[MOAB-dev] r1330 - MOAB/trunk/cmake
dcthomp at mcs.anl.gov
dcthomp at mcs.anl.gov
Wed Oct 24 14:38:38 CDT 2007
Author: dcthomp
Date: 2007-10-24 14:38:38 -0500 (Wed, 24 Oct 2007)
New Revision: 1330
Modified:
MOAB/trunk/cmake/AutoconfHeader.cmake
Log:
ENH: Check previous version of file (if any) to see
if there were any changes before writing new
version. This prevents unneccessary recompiles.
Modified: MOAB/trunk/cmake/AutoconfHeader.cmake
===================================================================
--- MOAB/trunk/cmake/AutoconfHeader.cmake 2007-10-24 17:02:25 UTC (rev 1329)
+++ MOAB/trunk/cmake/AutoconfHeader.cmake 2007-10-24 19:38:38 UTC (rev 1330)
@@ -17,6 +17,13 @@
endforeach ( VAR )
string( CONFIGURE "${autoconf_HEADER}" autoconf_HEADER_OUT )
-file( WRITE ${OUTFILE} "${autoconf_HEADER_OUT}" )
+if ( EXISTS "${OUTFILE}" )
+ file( READ "${OUTFILE}" __autoconf_HEADER_PREV )
+ if ( NOT "${autoconf_HEADER_OUT}" STREQUAL "${__autoconf_HEADER_PREV}" )
+ file( WRITE "${OUTFILE}" "${autoconf_HEADER_OUT}" )
+ endif ( NOT "${autoconf_HEADER_OUT}" STREQUAL "${__autoconf_HEADER_PREV}" )
+else ( EXISTS "${OUTFILE}" )
+ file( WRITE "${OUTFILE}" "${autoconf_HEADER_OUT}" )
+endif ( EXISTS "${OUTFILE}" )
endmacro( autoconf_header )
More information about the moab-dev
mailing list