summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Fischer <daniel.fischer@oracle.com>2011-06-10 14:57:42 +0200
committerDaniel Fischer <daniel.fischer@oracle.com>2011-06-10 14:57:42 +0200
commit96b6dc6d91e3314b9683da8c0453361eb9db540b (patch)
tree6b182216515a71e53db4ce31c89f27f8ecb0cd60
parentcc4530f92d31cc163257efd2fc2d1e4ccb33c35b (diff)
downloadmariadb-git-96b6dc6d91e3314b9683da8c0453361eb9db540b.tar.gz
RETURN doesn't exactly return from the macro...
-rw-r--r--cmake/plugin.cmake17
1 files changed, 8 insertions, 9 deletions
diff --git a/cmake/plugin.cmake b/cmake/plugin.cmake
index 68d8e2ac5f1..6f534568a2d 100644
--- a/cmake/plugin.cmake
+++ b/cmake/plugin.cmake
@@ -32,16 +32,15 @@ INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/cmake_parse_arguments.cmake)
MACRO(PLUGIN_APPEND_COLLECTIONS plugin)
SET(fcopied "${CMAKE_CURRENT_SOURCE_DIR}/tests/collections/FilesCopied")
- IF(EXISTS ${fcopied})
- RETURN()
+ IF(NOT EXISTS ${fcopied})
+ FILE(GLOB collections ${CMAKE_CURRENT_SOURCE_DIR}/tests/collections/*)
+ FOREACH(cfile ${collections})
+ FILE(READ ${cfile} contents)
+ GET_FILENAME_COMPONENT(fname ${cfile} NAME)
+ FILE(APPEND ${CMAKE_SOURCE_DIR}/mysql-test/collections/${fname} "${contents}")
+ FILE(APPEND ${fcopied} "${fname}\n")
+ ENDFOREACH()
ENDIF()
- FILE(GLOB collections ${CMAKE_CURRENT_SOURCE_DIR}/tests/collections/*)
- FOREACH(cfile ${collections})
- FILE(READ ${cfile} contents)
- GET_FILENAME_COMPONENT(fname ${cfile} NAME)
- FILE(APPEND ${CMAKE_SOURCE_DIR}/mysql-test/collections/${fname} "${contents}")
- FILE(APPEND ${fcopied} "${fname}\n")
- ENDFOREACH()
ENDMACRO()
MACRO(MYSQL_ADD_PLUGIN)