diff options
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}") |