]> https://gitweb.dealii.org/ - dealii.git/commitdiff
generate changes.h in binary dir 4190/head
authorTimo Heister <timo.heister@gmail.com>
Wed, 5 Apr 2017 21:35:23 +0000 (17:35 -0400)
committerTimo Heister <timo.heister@gmail.com>
Wed, 5 Apr 2017 21:35:23 +0000 (17:35 -0400)
closes #4102

doc/news/changes/create_changes_h.cmake

index 28148df2703bdebf92df488331a8b07b29a61a9a..8968bd1a334de9ac8f8d95d6175aa97ebd11e0e6 100644 (file)
@@ -42,24 +42,26 @@ ENDFUNCTION()
 # Generate 'changes.h'.
 
 # First, create a file 'changes.h.in' based on all changelog fragments.
-FILE(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/changes.h.in "")
-CAT    (${CMAKE_CURRENT_SOURCE_DIR}/header                   
-        ${CMAKE_CURRENT_SOURCE_DIR}/changes.h.in "FALSE")
-CAT    (${CMAKE_CURRENT_SOURCE_DIR}/header_incompatibilities 
-        ${CMAKE_CURRENT_SOURCE_DIR}/changes.h.in "FALSE")
-PROCESS(${CMAKE_CURRENT_SOURCE_DIR}/incompatibilities        
-        ${CMAKE_CURRENT_SOURCE_DIR}/changes.h.in)
-CAT    (${CMAKE_CURRENT_SOURCE_DIR}/header_major             
-        ${CMAKE_CURRENT_SOURCE_DIR}/changes.h.in "FALSE")
-PROCESS(${CMAKE_CURRENT_SOURCE_DIR}/major                    
-        ${CMAKE_CURRENT_SOURCE_DIR}/changes.h.in)
-CAT    (${CMAKE_CURRENT_SOURCE_DIR}/header_minor             
-        ${CMAKE_CURRENT_SOURCE_DIR}/changes.h.in "FALSE")
-PROCESS(${CMAKE_CURRENT_SOURCE_DIR}/minor                    
-        ${CMAKE_CURRENT_SOURCE_DIR}/changes.h.in)
-CAT    (${CMAKE_CURRENT_SOURCE_DIR}/footer                   
-        ${CMAKE_CURRENT_SOURCE_DIR}/changes.h.in "FALSE")
+SET(OUTPUT_FILE_TEMP "${OUTPUT_FILE}.in")
+FILE(WRITE ${OUTPUT_FILE_TEMP} "")
+CAT    (${CMAKE_CURRENT_SOURCE_DIR}/header
+        ${OUTPUT_FILE_TEMP} "FALSE")
+CAT    (${CMAKE_CURRENT_SOURCE_DIR}/header_incompatibilities
+        ${OUTPUT_FILE_TEMP} "FALSE")
+PROCESS(${CMAKE_CURRENT_SOURCE_DIR}/incompatibilities
+        ${OUTPUT_FILE_TEMP})
+CAT    (${CMAKE_CURRENT_SOURCE_DIR}/header_major
+        ${OUTPUT_FILE_TEMP} "FALSE")
+PROCESS(${CMAKE_CURRENT_SOURCE_DIR}/major
+        ${OUTPUT_FILE_TEMP})
+CAT    (${CMAKE_CURRENT_SOURCE_DIR}/header_minor
+        ${OUTPUT_FILE_TEMP} "FALSE")
+PROCESS(${CMAKE_CURRENT_SOURCE_DIR}/minor
+        ${OUTPUT_FILE_TEMP})
+CAT    (${CMAKE_CURRENT_SOURCE_DIR}/footer
+        ${OUTPUT_FILE_TEMP} "FALSE")
 
-# Copy it over to 'changes.h' but only touch the time stamp 
+# Copy it over to 'changes.h' but only touch the time stamp
 # if the file actually changed (this is what CONFIGURE_FILE does).
-CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/changes.h.in ${OUTPUT_FILE} COPYONLY)
+MESSAGE(STATUS "Generating changelog file: ${OUTPUT_FILE}")
+CONFIGURE_FILE(${OUTPUT_FILE_TEMP} ${OUTPUT_FILE} COPYONLY)

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.