diff options
author | Brad King <brad.king@kitware.com> | 2012-02-08 16:58:57 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-02-09 13:38:56 (GMT) |
commit | 1e16406dc9a8c5bdad7adbed8c3b6cee0a7020d0 (patch) | |
tree | ca7a67556eac7a4a3f64ca71b316fbd5c966472f /Modules/CMakeAddFortranSubdirectory.cmake | |
parent | 6f6891b33736918f149279dc7d1e9ade50efd917 (diff) | |
download | CMake-1e16406dc9a8c5bdad7adbed8c3b6cee0a7020d0.zip CMake-1e16406dc9a8c5bdad7adbed8c3b6cee0a7020d0.tar.gz CMake-1e16406dc9a8c5bdad7adbed8c3b6cee0a7020d0.tar.bz2 |
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.
Diffstat (limited to 'Modules/CMakeAddFortranSubdirectory.cmake')
-rw-r--r-- | Modules/CMakeAddFortranSubdirectory.cmake | 16 |
1 files changed, 15 insertions, 1 deletions
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 |