diff options
author | Brad King <brad.king@kitware.com> | 2012-02-08 16:55:07 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-02-09 13:38:56 (GMT) |
commit | 6f6891b33736918f149279dc7d1e9ade50efd917 (patch) | |
tree | 7a250dcad99a986f3a68f07de1adac5d1cc08be3 /Modules/CMakeAddFortranSubdirectory.cmake | |
parent | 48a09f82ccadf93eb2d60c9efe5da783327a8520 (diff) | |
download | CMake-6f6891b33736918f149279dc7d1e9ade50efd917.zip CMake-6f6891b33736918f149279dc7d1e9ade50efd917.tar.gz CMake-6f6891b33736918f149279dc7d1e9ade50efd917.tar.bz2 |
CMakeAddFortranSubdirectory: Always parse arguments
Parse arguments even in add_subdirectory() mode to validate them.
Diffstat (limited to 'Modules/CMakeAddFortranSubdirectory.cmake')
-rw-r--r-- | Modules/CMakeAddFortranSubdirectory.cmake | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Modules/CMakeAddFortranSubdirectory.cmake b/Modules/CMakeAddFortranSubdirectory.cmake index 5c3e9a2..681b09e 100644 --- a/Modules/CMakeAddFortranSubdirectory.cmake +++ b/Modules/CMakeAddFortranSubdirectory.cmake @@ -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}") |