]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
CMake: rebuild Makefile.inc.cmake when Makefile.inc changes
authorPeter Wu <peter@lekensteyn.nl>
Wed, 27 May 2020 20:36:22 +0000 (22:36 +0200)
committerPeter Wu <peter@lekensteyn.nl>
Thu, 28 May 2020 08:46:07 +0000 (10:46 +0200)
Otherwise the build might fail due to missing source files, as
demonstrated by the recent keylog.c addition on an existing build dir.

Closes #5469

CMakeLists.txt

index a311e125944440c00e2238724b2428f8e0503a2c..a13395db7957282b67d855072d6c0a45df8c9ae4 100644 (file)
@@ -1268,7 +1268,7 @@ function(transform_makefile_inc INPUT_FILE OUTPUT_FILE)
   string(REGEX REPLACE "\\$\\(([a-zA-Z_][a-zA-Z0-9_]*)\\)" "\${\\1}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})    # Replace $() with ${}
   string(REGEX REPLACE "@([a-zA-Z_][a-zA-Z0-9_]*)@" "\${\\1}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})    # Replace @@ with ${}, even if that may not be read by CMake scripts.
   file(WRITE ${OUTPUT_FILE} ${MAKEFILE_INC_TEXT})
-
+  set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${INPUT_FILE}")
 endfunction()
 
 include(GNUInstallDirs)