diff --git a/bin/am2cmake.py b/bin/am2cmake.py
index 96a5d846e74af7380cf3838e6e3d12185c2ef7fc..ee717b3d6b724e4a47f8035139d066843f1fb929 100755
--- a/bin/am2cmake.py
+++ b/bin/am2cmake.py
@@ -22,7 +22,7 @@ class rem_proc:
     def process_SUBDIRS(self):
         return ''.join([self.foreach_begin(),
                         "  if(${i} STREQUAL \"test\")\n",
-                        "    set(opt \"EXCLUDE_FROM_ALL)\"\n",
+                        "    set(opt EXCLUDE_FROM_ALL)\n",
                         "  endif(${i} STREQUAL \"test\")\n",
                         "  add_subdirectory(${i} ${opt})\n"+self.foreach_end()])