Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config_file error when called with multiple arguments #18

Open
massich opened this issue Mar 8, 2018 · 1 comment
Open

config_file error when called with multiple arguments #18

massich opened this issue Mar 8, 2018 · 1 comment

Comments

@massich
Copy link

massich commented Mar 8, 2018

I'm using ac2cmake as suggested by @pfultz2 in this PR and I get this error:

CMake Warning (dev) at cmake/cget-recipe-utils-config.cmake:390 (configure_file):
  configure_file called with unknown argument(s):
   matio/src/Makefile
   matio/getopt/Makefile
   matio/tools/Makefile
   matio/test/Makefile
   matio/documentation/Makefile

If I understand properly the following snipped passes all the parameters I've used when calling ac_config_file here directly to cmake's configure_file.

function(ac_config_file)
set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix ${CMAKE_INSTALL_PREFIX})
set(libdir ${CMAKE_INSTALL_PREFIX}/lib)
set(includedir ${CMAKE_INSTALL_PREFIX}/include)
configure_file(${ARGN})

which ends up violating configure_file's signature:

configure_file(<input> <output>
               [COPYONLY] [ESCAPE_QUOTES] [@ONLY]
               [NEWLINE_STYLE [UNIX|DOS|WIN32|LF|CRLF] ])

Any suggestions? Shall we do some sort of foreach(arg ${args}) and then call config_file with ${arg}, but if so how shall we construct the <input> or <output>?

@pfultz2
Copy link
Owner

pfultz2 commented Jul 20, 2018

Yea, it only takes one file, and you need to set the input and output file names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants