[Cmake-commits] CMake branch, next, updated. v2.8.7-2514-g319ec8f
Brad King
brad.king at kitware.com
Wed Feb 8 12:02:44 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 319ec8fe8e53b480fe6400d83887bbaee2f89695 (commit)
via 75e12d93debb950e1f82b7527b23d7c79aeec0e9 (commit)
via 0ded1778b4f857180331b7aef0b207b8fe14013d (commit)
via fee677bb29fabb273c0ac4028f0ad64a2b0cf194 (commit)
via c6827bcb61cd04a5783ae64cff3e2e819e895b95 (commit)
via 65512c37a33423db4ef458f85871f5cafc0306a3 (commit)
via 0fd099b487dfdaf8fd9865938fbef933a6e52cc5 (commit)
from deb696247fb4a48477ed100e5ddd49f8d13e2400 (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=319ec8fe8e53b480fe6400d83887bbaee2f89695
commit 319ec8fe8e53b480fe6400d83887bbaee2f89695
Merge: deb6962 75e12d9
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Feb 8 12:02:33 2012 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Feb 8 12:02:33 2012 -0500
Merge topic 'cmake_add_fortran_subdirectory' into next
75e12d9 CMakeAddFortranSubdirectory: Add NO_EXTERNAL_INSTALL option
0ded177 CMakeAddFortranSubdirectory: Always parse arguments
fee677b Remove unused Modules/external_mingw_project.cmake.in
c6827bc Rename directory Modules/{ => CMake}AddFortranSubdirectory
65512c3 Hide CheckFortran back in Tests and use CheckLanguage instead
0fd099b Merge branch 'add-CheckLanguage-module' into cmake_add_fortran_subdirectory
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=75e12d93debb950e1f82b7527b23d7c79aeec0e9
commit 75e12d93debb950e1f82b7527b23d7c79aeec0e9
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Feb 8 11:58:57 2012 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Wed Feb 8 11:58:57 2012 -0500
CMakeAddFortranSubdirectory: Add NO_EXTERNAL_INSTALL option
We do not yet support "make install" in the external project case.
Document this explicitly in the interface. Require the caller to use an
option to "disable" the unsupported behavior. This will allow us to add
the behavior by default in the future without clobbering existing
projects that handle the installation themselves.
diff --git a/Modules/CMakeAddFortranSubdirectory.cmake b/Modules/CMakeAddFortranSubdirectory.cmake
index 681b09e..ddb79fb 100644
--- a/Modules/CMakeAddFortranSubdirectory.cmake
+++ b/Modules/CMakeAddFortranSubdirectory.cmake
@@ -19,10 +19,17 @@
# LINK_LIBRARIES # link interface libraries for LIBRARIES
# [LINK_LIBS <lib> <dep>...]...
# CMAKE_COMMAND_LINE ... # extra command line flags to pass to cmake
+# NO_EXTERNAL_INSTALL # skip installation of external project
# )
# Relative paths in ARCHIVE_DIR and RUNTIME_DIR are interpreted with respect
# to the build directory corresponding to the source directory in which the
# function is invoked.
+#
+# Limitations:
+#
+# NO_EXTERNAL_INSTALL is required for forward compatibility with a
+# future version that supports installation of the external project
+# binaries during "make install".
#=============================================================================
# Copyright 2011-2012 Kitware, Inc.
@@ -100,9 +107,16 @@ endfunction()
function(cmake_add_fortran_subdirectory subdir)
# Parse arguments to function
+ set(options NO_EXTERNAL_INSTALL)
set(oneValueArgs PROJECT ARCHIVE_DIR RUNTIME_DIR)
set(multiValueArgs LIBRARIES LINK_LIBRARIES CMAKE_COMMAND_LINE)
- cmake_parse_arguments(ARGS "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+ cmake_parse_arguments(ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+ if(NOT ARGS_NO_EXTERNAL_INSTALL)
+ message(FATAL_ERROR
+ "Option NO_EXTERNAL_INSTALL is required (for forward compatibility) "
+ "but was not given."
+ )
+ endif()
# if we are not using MSVC without fortran support
# then just use the usual add_subdirectory to build
diff --git a/Tests/VSGNUFortran/subdir/CMakeLists.txt b/Tests/VSGNUFortran/subdir/CMakeLists.txt
index df018b3..0b99199 100644
--- a/Tests/VSGNUFortran/subdir/CMakeLists.txt
+++ b/Tests/VSGNUFortran/subdir/CMakeLists.txt
@@ -12,4 +12,5 @@ cmake_add_fortran_subdirectory(fortran
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
LINK_LIBRARIES # link interface libraries
LINK_LIBS hello world # hello needs world to link
- )
+ NO_EXTERNAL_INSTALL
+ )
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0ded1778b4f857180331b7aef0b207b8fe14013d
commit 0ded1778b4f857180331b7aef0b207b8fe14013d
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Feb 8 11:55:07 2012 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Wed Feb 8 11:57:00 2012 -0500
CMakeAddFortranSubdirectory: Always parse arguments
Parse arguments even in add_subdirectory() mode to validate them.
diff --git a/Modules/CMakeAddFortranSubdirectory.cmake b/Modules/CMakeAddFortranSubdirectory.cmake
index 148749f..681b09e 100644
--- a/Modules/CMakeAddFortranSubdirectory.cmake
+++ b/Modules/CMakeAddFortranSubdirectory.cmake
@@ -25,7 +25,7 @@
# function is invoked.
#=============================================================================
-# Copyright 2011 Kitware, Inc.
+# Copyright 2011-2012 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
@@ -99,6 +99,11 @@ endfunction()
function(cmake_add_fortran_subdirectory subdir)
+ # Parse arguments to function
+ set(oneValueArgs PROJECT ARCHIVE_DIR RUNTIME_DIR)
+ set(multiValueArgs LIBRARIES LINK_LIBRARIES CMAKE_COMMAND_LINE)
+ cmake_parse_arguments(ARGS "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+
# if we are not using MSVC without fortran support
# then just use the usual add_subdirectory to build
# the fortran library
@@ -111,10 +116,6 @@ function(cmake_add_fortran_subdirectory subdir)
# if we have MSVC without Intel fortran then setup
# external projects to build with mingw fortran
- # Parse arguments to function
- set(oneValueArgs PROJECT ARCHIVE_DIR RUNTIME_DIR)
- set(multiValueArgs LIBRARIES LINK_LIBRARIES CMAKE_COMMAND_LINE)
- cmake_parse_arguments(ARGS "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
set(source_dir "${CMAKE_CURRENT_SOURCE_DIR}/${subdir}")
set(project_name "${ARGS_PROJECT}")
set(library_dir "${ARGS_ARCHIVE_DIR}")
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fee677bb29fabb273c0ac4028f0ad64a2b0cf194
commit fee677bb29fabb273c0ac4028f0ad64a2b0cf194
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Feb 8 11:28:11 2012 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Wed Feb 8 11:28:11 2012 -0500
Remove unused Modules/external_mingw_project.cmake.in
This file was added with CMakeAddFortranSubdirectory.cmake but is not
used.
diff --git a/Modules/external_mingw_project.cmake.in b/Modules/external_mingw_project.cmake.in
deleted file mode 100644
index 5db8a1e..0000000
--- a/Modules/external_mingw_project.cmake.in
+++ /dev/null
@@ -1,54 +0,0 @@
-include(ExternalProject)
-
-set(LAPACK_BUILD_DIR "${fortranc_BINARY_DIR}/lapack-build")
-find_program(MINGW_GFORTRAN gfortran
- c:/MinGW/bin
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MinGW;InstallLocation]/bin")
-if(NOT MINGW_GFORTRAN)
- message(FATAL_ERROR
- "gfortran not found, please install MinGW with the gfortran option."
- " This is required to build blas/lapack")
-endif()
-get_filename_component(MINGW_PATH ${MINGW_GFORTRAN} PATH)
-file(TO_NATIVE_PATH "${MINGW_PATH}" MINGW_PATH)
-string(REPLACE "\\" "\\\\" MINGW_PATH "${MINGW_PATH}")
-configure_file(${fortranc_SOURCE_DIR}/config_mingw.cmake.in
- ${fortranc_BINARY_DIR}/config_mingw.cmake @ONLY)
-configure_file(${fortranc_SOURCE_DIR}/build_mingw.cmake.in
- ${fortranc_BINARY_DIR}/build_mingw.cmake @ONLY)
-
-externalproject_add(LAPACK
- SOURCE_DIR ${fortranc_SOURCE_DIR}/lapack
- BINARY_DIR ${fortranc_BINARY_DIR}/lapack-build
- CONFIGURE_COMMAND ${CMAKE_COMMAND}
- -P ${fortranc_BINARY_DIR}/config_mingw.cmake
- BUILD_COMMAND ${CMAKE_COMMAND}
- -P ${fortranc_BINARY_DIR}/build_mingw.cmake
- INSTALL_COMMAND ""
-)
-
-externalproject_add_step(LAPACK forcebuild
- COMMAND ${CMAKE_COMMAND}
- -E remove ${CMAKE_CURRENT_BUILD_DIR}/lapack-prefix/src/lapack-stamp/lapack-build
- DEPENDEES configure
- DEPENDERS build
- ALWAYS 1
-)
-
-add_library(blas SHARED IMPORTED)
-add_library(lapack SHARED IMPORTED)
-# Import target "blas" for configuration ""
-set_property(TARGET blas APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG)
-set_target_properties(blas PROPERTIES
- IMPORTED_IMPLIB_NOCONFIG "${LAPACK_BUILD_DIR}/lib/libblas.lib"
- IMPORTED_LOCATION_NOCONFIG "${LAPACK_BUILD_DIR}/bin/libblas.dll"
- )
-
-# Import target "lapack" for configuration ""
-set_property(TARGET lapack APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG)
-set_target_properties(lapack PROPERTIES
- IMPORTED_IMPLIB_NOCONFIG "${LAPACK_BUILD_DIR}/lib/liblapack.lib"
- IMPORTED_LINK_INTERFACE_LIBRARIES_NOCONFIG "blas"
- IMPORTED_LOCATION_NOCONFIG "${LAPACK_BUILD_DIR}/bin/liblapack.dll"
- )
-add_dependencies(lapack LAPACK)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c6827bcb61cd04a5783ae64cff3e2e819e895b95
commit c6827bcb61cd04a5783ae64cff3e2e819e895b95
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Feb 8 11:26:25 2012 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Wed Feb 8 11:26:25 2012 -0500
Rename directory Modules/{ => CMake}AddFortranSubdirectory
The latter matches the module name that uses it.
diff --git a/Modules/CMakeAddFortranSubdirectory.cmake b/Modules/CMakeAddFortranSubdirectory.cmake
index cc42ee3..148749f 100644
--- a/Modules/CMakeAddFortranSubdirectory.cmake
+++ b/Modules/CMakeAddFortranSubdirectory.cmake
@@ -83,11 +83,11 @@ function(_setup_mingw_config_and_build source_dir)
file(TO_NATIVE_PATH "${MINGW_PATH}" MINGW_PATH)
string(REPLACE "\\" "\\\\" MINGW_PATH "${MINGW_PATH}")
configure_file(
- ${_MS_MINGW_SOURCE_DIR}/AddFortranSubdirectory/config_mingw.cmake.in
+ ${_MS_MINGW_SOURCE_DIR}/CMakeAddFortranSubdirectory/config_mingw.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/config_mingw.cmake
@ONLY)
configure_file(
- ${_MS_MINGW_SOURCE_DIR}/AddFortranSubdirectory/build_mingw.cmake.in
+ ${_MS_MINGW_SOURCE_DIR}/CMakeAddFortranSubdirectory/build_mingw.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/build_mingw.cmake
@ONLY)
endfunction()
diff --git a/Modules/AddFortranSubdirectory/build_mingw.cmake.in b/Modules/CMakeAddFortranSubdirectory/build_mingw.cmake.in
similarity index 100%
rename from Modules/AddFortranSubdirectory/build_mingw.cmake.in
rename to Modules/CMakeAddFortranSubdirectory/build_mingw.cmake.in
diff --git a/Modules/AddFortranSubdirectory/config_mingw.cmake.in b/Modules/CMakeAddFortranSubdirectory/config_mingw.cmake.in
similarity index 100%
rename from Modules/AddFortranSubdirectory/config_mingw.cmake.in
rename to Modules/CMakeAddFortranSubdirectory/config_mingw.cmake.in
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=65512c37a33423db4ef458f85871f5cafc0306a3
commit 65512c37a33423db4ef458f85871f5cafc0306a3
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Feb 8 11:22:19 2012 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Wed Feb 8 11:22:19 2012 -0500
Hide CheckFortran back in Tests and use CheckLanguage instead
The CheckFortran module was moved to the Modules directory for use by
CMakeAddFortranSubdirectory. Move it back to Tests and use the more
general CheckLanguage module instead.
diff --git a/Modules/CMakeAddFortranSubdirectory.cmake b/Modules/CMakeAddFortranSubdirectory.cmake
index 8cfe2fb..cc42ee3 100644
--- a/Modules/CMakeAddFortranSubdirectory.cmake
+++ b/Modules/CMakeAddFortranSubdirectory.cmake
@@ -39,7 +39,7 @@
set(_MS_MINGW_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR})
-include(CheckFortran)
+include(CheckLanguage)
include(ExternalProject)
include(CMakeParseArguments)
@@ -102,6 +102,7 @@ function(cmake_add_fortran_subdirectory subdir)
# if we are not using MSVC without fortran support
# then just use the usual add_subdirectory to build
# the fortran library
+ check_language(Fortran)
if(NOT (MSVC AND (NOT CMAKE_Fortran_COMPILER)))
add_subdirectory(${subdir})
return()
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 0839997..9c97828 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -16,7 +16,7 @@ MACRO(ADD_TEST_MACRO NAME COMMAND)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${dir}")
ENDMACRO(ADD_TEST_MACRO)
-INCLUDE(${CMake_SOURCE_DIR}/Modules/CheckFortran.cmake)
+INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CheckFortran.cmake)
# Fake a user home directory to avoid polluting the real one.
IF(DEFINED ENV{HOME} AND NOT CTEST_NO_TEST_HOME)
diff --git a/Modules/CheckFortran.cmake b/Tests/CheckFortran.cmake
similarity index 100%
rename from Modules/CheckFortran.cmake
rename to Tests/CheckFortran.cmake
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0fd099b487dfdaf8fd9865938fbef933a6e52cc5
commit 0fd099b487dfdaf8fd9865938fbef933a6e52cc5
Merge: 4b5e270 5db99e8
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Feb 8 11:18:44 2012 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Wed Feb 8 11:18:44 2012 -0500
Merge branch 'add-CheckLanguage-module' into cmake_add_fortran_subdirectory
-----------------------------------------------------------------------
Summary of changes:
Modules/CMakeAddFortranSubdirectory.cmake | 32 +++++++++---
.../build_mingw.cmake.in | 0
.../config_mingw.cmake.in | 0
Modules/external_mingw_project.cmake.in | 54 --------------------
Tests/CMakeLists.txt | 2 +-
{Modules => Tests}/CheckFortran.cmake | 0
Tests/VSGNUFortran/subdir/CMakeLists.txt | 3 +-
7 files changed, 27 insertions(+), 64 deletions(-)
rename Modules/{AddFortranSubdirectory => CMakeAddFortranSubdirectory}/build_mingw.cmake.in (100%)
rename Modules/{AddFortranSubdirectory => CMakeAddFortranSubdirectory}/config_mingw.cmake.in (100%)
delete mode 100644 Modules/external_mingw_project.cmake.in
rename {Modules => Tests}/CheckFortran.cmake (100%)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list