diff options
author | Brad King <brad.king@kitware.com> | 2010-06-07 18:21:49 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-06-07 18:21:49 (GMT) |
commit | 2bc82e07bdf6ebd9aad5ebcad170637519cea990 (patch) | |
tree | 64610b058afc069837094aba896c1d539fbafd92 /Modules/ExternalProject.cmake | |
parent | ba38f0925ced696a905bf625aaead5b69cc105aa (diff) | |
parent | ea6260cb188f1ab1982f88504d5fb1017a233144 (diff) | |
download | CMake-2bc82e07bdf6ebd9aad5ebcad170637519cea990.zip CMake-2bc82e07bdf6ebd9aad5ebcad170637519cea990.tar.gz CMake-2bc82e07bdf6ebd9aad5ebcad170637519cea990.tar.bz2 |
Merge branch 'ExternalProject-fixes'
Diffstat (limited to 'Modules/ExternalProject.cmake')
-rw-r--r-- | Modules/ExternalProject.cmake | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index 6479f4a..2fbab17 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -159,6 +159,7 @@ function(_ep_parse_arguments f name ns args) if(NOT (key STREQUAL "COMMAND") AND NOT (key STREQUAL "CVS_MODULE") AND NOT (key STREQUAL "DEPENDS") + AND NOT (key STREQUAL "DOWNLOAD_COMMAND") ) message(AUTHOR_WARNING "unknown ${f} keyword: ${arg}") endif() @@ -801,7 +802,7 @@ endfunction(_ep_add_patch_command) # TODO: Make sure external projects use the proper compiler function(_ep_add_configure_command name) - ExternalProject_Get_Property(${name} source_dir binary_dir) + ExternalProject_Get_Property(${name} source_dir binary_dir tmp_dir) _ep_get_configuration_subdir_suffix(cfgdir) @@ -835,6 +836,16 @@ function(_ep_add_configure_command name) endif() endif() + # If anything about the configure command changes, (command itself, cmake + # used, cmake args or cmake generator) then re-run the configure step. + # Fixes issue http://public.kitware.com/Bug/view.php?id=10258 + # + if(NOT EXISTS ${tmp_dir}/${name}-cfgcmd.txt.in) + file(WRITE ${tmp_dir}/${name}-cfgcmd.txt.in "cmd='@cmd@'\n") + endif() + configure_file(${tmp_dir}/${name}-cfgcmd.txt.in ${tmp_dir}/${name}-cfgcmd.txt) + list(APPEND file_deps ${tmp_dir}/${name}-cfgcmd.txt) + ExternalProject_Add_Step(${name} configure COMMAND ${cmd} WORKING_DIRECTORY ${binary_dir} |