[Cmake-commits] CMake branch, next, updated. v2.8.7-2632-g2128373

Bill Hoffman bill.hoffman at kitware.com
Wed Feb 15 22:46:42 EST 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  2128373082002cd11c2e3802d8346fc6d83df6f3 (commit)
       via  087bea35c158f336a3193a97b06bdce3d8ce35f8 (commit)
      from  733ac6bd2dc822daa6b6d58a789cbd081ef6a037 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2128373082002cd11c2e3802d8346fc6d83df6f3
commit 2128373082002cd11c2e3802d8346fc6d83df6f3
Merge: 733ac6b 087bea3
Author:     Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Wed Feb 15 22:46:33 2012 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Feb 15 22:46:33 2012 -0500

    Merge topic 'fix_fortran_dir_two_dirs' into next
    
    087bea3 Allow two cmake_add_fortran_subdirectory calls in the same project.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=087bea35c158f336a3193a97b06bdce3d8ce35f8
commit 087bea35c158f336a3193a97b06bdce3d8ce35f8
Author:     Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Wed Feb 15 22:42:31 2012 -0500
Commit:     Bill Hoffman <bill.hoffman at kitware.com>
CommitDate: Wed Feb 15 22:42:31 2012 -0500

    Allow two cmake_add_fortran_subdirectory calls in the same project.
    
    Configure the build_mingw.cmake.in  config_mingw.cmake.in files
    into the binary directory of the directory being built, not the
    top level binary directory for the project.

diff --git a/Modules/CMakeAddFortranSubdirectory.cmake b/Modules/CMakeAddFortranSubdirectory.cmake
index ddb79fb..abd9100 100644
--- a/Modules/CMakeAddFortranSubdirectory.cmake
+++ b/Modules/CMakeAddFortranSubdirectory.cmake
@@ -50,7 +50,7 @@ include(CheckLanguage)
 include(ExternalProject)
 include(CMakeParseArguments)
 
-function(_setup_mingw_config_and_build source_dir)
+function(_setup_mingw_config_and_build source_dir build_dir)
   # Look for a MinGW gfortran.
   find_program(MINGW_GFORTRAN
     NAMES gfortran
@@ -91,11 +91,11 @@ function(_setup_mingw_config_and_build source_dir)
   string(REPLACE "\\" "\\\\" MINGW_PATH "${MINGW_PATH}")
   configure_file(
     ${_MS_MINGW_SOURCE_DIR}/CMakeAddFortranSubdirectory/config_mingw.cmake.in
-    ${CMAKE_CURRENT_BINARY_DIR}/config_mingw.cmake
+    ${build_dir}/config_mingw.cmake
     @ONLY)
   configure_file(
     ${_MS_MINGW_SOURCE_DIR}/CMakeAddFortranSubdirectory/build_mingw.cmake.in
-    ${CMAKE_CURRENT_BINARY_DIR}/build_mingw.cmake
+    ${build_dir}/build_mingw.cmake
     @ONLY)
 endfunction()
 
@@ -144,15 +144,15 @@ function(cmake_add_fortran_subdirectory subdir)
     endif()
   endforeach()
   # create build and configure wrapper scripts
-  _setup_mingw_config_and_build(${source_dir})
+  _setup_mingw_config_and_build("${source_dir}" "${build_dir}")
   # create the external project
   externalproject_add(${project_name}_build
     SOURCE_DIR ${source_dir}
     BINARY_DIR ${build_dir}
     CONFIGURE_COMMAND ${CMAKE_COMMAND}
-    -P ${CMAKE_CURRENT_BINARY_DIR}/config_mingw.cmake
+    -P ${build_dir}/config_mingw.cmake
     BUILD_COMMAND ${CMAKE_COMMAND}
-    -P ${CMAKE_CURRENT_BINARY_DIR}/build_mingw.cmake
+    -P ${build_dir}/build_mingw.cmake
     INSTALL_COMMAND ""
     )
   # make the external project always run make with each build

-----------------------------------------------------------------------

Summary of changes:
 Modules/CMakeAddFortranSubdirectory.cmake |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list