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

make fails with 'Macro invoked with incorrect arguments for macro named: adjust' #1

Open
AlexCzar opened this issue Jan 7, 2014 · 1 comment

Comments

@AlexCzar
Copy link

AlexCzar commented Jan 7, 2014

Command that fails:

/usr/bin/cmake
 -Dconfig=/path/to/oxy-cursors/src/config/a2a266d0498c3104214a47bd64ab0fc8.in
 -Doutput=/path/to/oxy-cursors/build/oxy-brown/config/a2a266d0498c3104214a47bd64ab0fc8.in
 -Ddpi=90 -P /home/czar/Downloads/oxy-cursors/src/make_config.cmake

Failure message:

CMake Error at /path/to/oxy-cursors/src/make_config.cmake:15 (adjust):
  adjust Macro invoked with incorrect arguments for macro named: adjust

Full log: https://gist.github.com/AlexCzar/4da20640193be0c80c06

Software versions used:

GNU Make 3.82
cmake version 2.8.11.2
Inkscape 0.48.4 r9939
@Chocimier
Copy link

diff --git a/src/make_config.cmake b/src/make_config.cmake
index 564601e..816f597 100644
--- a/src/make_config.cmake
+++ b/src/make_config.cmake
@@ -11,8 +11,12 @@ file(READ "${config}" in_contents)
 set(out_contents)
 string(REPLACE "\n" ";" in_contents "${in_contents}")
 foreach(in_line ${in_contents})
-   string(REGEX REPLACE "[ \t]+" ";" in_line "${in_line}")
-   adjust(${in_line})
+   if(in_line MATCHES "#.*")
+      list(APPEND out_contents "${in_line}")
+   else()
+      string(REGEX REPLACE "[ \t]+" ";" in_line "${in_line}")
+      adjust(${in_line})
+   endif()
 endforeach(in_line)
 string(REPLACE ";" "\n" out_contents "${out_contents}")
 file(WRITE "${output}" "${out_contents}\n")

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