Revision: 69118
          http://sourceforge.net/p/brlcad/code/69118
Author:   starseeker
Date:     2016-10-18 15:59:33 +0000 (Tue, 18 Oct 2016)
Log Message:
-----------
I don't think we actually need to hit the file system for this - try a STREQUAL 
test.

Modified Paths:
--------------
    brlcad/trunk/CMakeLists.txt

Modified: brlcad/trunk/CMakeLists.txt
===================================================================
--- brlcad/trunk/CMakeLists.txt 2016-10-18 15:35:48 UTC (rev 69117)
+++ brlcad/trunk/CMakeLists.txt 2016-10-18 15:59:33 UTC (rev 69118)
@@ -3149,21 +3149,12 @@
 function(DIFF_FILE filename)
   file(READ "${BRLCAD_SOURCE_DIR}/${filename}" SRC_STR)
   file(READ "${BRLCAD_BINARY_DIR}/${filename}.new" BIN_STR)
-  string(REGEX REPLACE "\\r?\\n" "" OLD_STR "${SRC_STR}")
-  string(REGEX REPLACE "\\r?\\n" "" NEW_STR "${BIN_STR}")
-  file(WRITE "${BRLCAD_BINARY_DIR}/${filename}.old_nws" "${OLD_STR}")
-  file(WRITE "${BRLCAD_BINARY_DIR}/${filename}.new_nws" "${NEW_STR}")
-  DISTCLEAN("${CMAKE_BINARY_DIR}/${filename}.old_nws")
-  DISTCLEAN("${CMAKE_BINARY_DIR}/${filename}.new_nws")
-  set(IS_DIFFERENT 0)
-  execute_process(COMMAND ${CMAKE_COMMAND} -E compare_files
-    "${BRLCAD_BINARY_DIR}/${filename}.old_nws" 
"${BRLCAD_BINARY_DIR}/${filename}.new_nws"
-    RESULT_VARIABLE IS_DIFFERENT OUTPUT_VARIABLE DIFF_OUTPUT ERROR_VARIABLE
-    DIFF_ERROR)
-  if(IS_DIFFERENT)
+  string(REGEX REPLACE "\r?\n" "" OLD_STR "${SRC_STR}")
+  string(REGEX REPLACE "\r?\n" "" NEW_STR "${BIN_STR}")
+  if(NOT "${OLD_STR}" STREQUAL "${NEW_STR}")
     set(CONFIG_FATAL_ERROR 1 PARENT_SCOPE)
     message("\n\"${BRLCAD_SOURCE_DIR}/${filename}\" is out of date.  An 
updated version has been generated at 
\"${BRLCAD_BINARY_DIR}/${filename}.new\"\nTo clear this warning, replace 
\"${BRLCAD_SOURCE_DIR}/${filename}\" with 
\"${BRLCAD_BINARY_DIR}/${filename}.new\"\n")
-  endif(IS_DIFFERENT)
+  endif(NOT "${OLD_STR}" STREQUAL "${NEW_STR}")
 endfunction(DIFF_FILE filename)
 
 # Finalize and check INSTALL file

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to