Remove gitconfig.h.cmake
authorMichael Kruse <llvm@meinersbur.de>
Tue, 21 Jul 2015 12:06:27 +0000 (12:06 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Tue, 21 Jul 2015 12:06:27 +0000 (12:06 +0000)
It is just one line which can be better generated in the CMakeLists.txt
itself, just as ISL's configure does.

Reviewers: grosser
llvm-svn: 242771

polly/lib/CMakeLists.txt
polly/lib/External/gitversion.h.cmake [deleted file]

index d61ba7c..704da24 100644 (file)
@@ -140,7 +140,12 @@ if (NOT HAVE_DECL_SNPRINTF AND NOT HAVE_DECL__SNPRINTF)
 endif ()
 
 # Write configure result
-configure_file("External/gitversion.h.cmake" "${ISL_BINARY_DIR}/gitversion.h")
+# configure_file(... COPYONLY) avoids that the time stamp changes if the file is identical
+file(WRITE "${ISL_BINARY_DIR}/gitversion.h.tmp"
+     "#define GIT_HEAD_ID \"${GIT_HEAD_ID}\"")
+configure_file("${ISL_BINARY_DIR}/gitversion.h.tmp"
+               "${ISL_BINARY_DIR}/gitversion.h" COPYONLY)
+
 configure_file("External/isl_config.h.cmake" "${ISL_BINARY_DIR}/isl_config.h")
 
 # ISL files to compile
diff --git a/polly/lib/External/gitversion.h.cmake b/polly/lib/External/gitversion.h.cmake
deleted file mode 100644 (file)
index 8a6f36e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#define GIT_HEAD_ID "@GIT_HEAD_ID@"