Commit 6f6891b3 authored by Brad King's avatar Brad King

CMakeAddFortranSubdirectory: Always parse arguments

Parse arguments even in add_subdirectory() mode to validate them.
parent 48a09f82
......@@ -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}")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment