summaryrefslogtreecommitdiff
path: root/dbug
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-07-08 19:34:53 +0200
committerSergei Golubchik <sergii@pisem.net>2014-07-08 19:34:53 +0200
commit528c1111ad8ac116ba3fe2a4a640a1006f666338 (patch)
treecd4d6490061168badcf98e272f626e6ecf184d62 /dbug
parent648fb98eb6834781e5ff7bd13f26e7b3755fdf81 (diff)
parentcdc38712e4d359348346758e47e1ebc7d1743f82 (diff)
downloadmariadb-git-528c1111ad8ac116ba3fe2a4a640a1006f666338.tar.gz
MDEV-6410 Cross-compile fixes
https://code.launchpad.net/~chewi/maria/mysql-fix-bug61340/+merge/217351
Diffstat (limited to 'dbug')
-rw-r--r--dbug/CMakeLists.txt16
1 files changed, 9 insertions, 7 deletions
diff --git a/dbug/CMakeLists.txt b/dbug/CMakeLists.txt
index 3d0b0801132..c40c70b684d 100644
--- a/dbug/CMakeLists.txt
+++ b/dbug/CMakeLists.txt
@@ -24,8 +24,10 @@ TARGET_LINK_LIBRARIES(dbug mysys)
ADD_EXECUTABLE(tests tests.c)
TARGET_LINK_LIBRARIES(tests dbug)
-ADD_EXECUTABLE(factorial my_main.c factorial.c)
-TARGET_LINK_LIBRARIES(factorial dbug)
+IF(NOT CMAKE_CROSSCOMPILING)
+ ADD_EXECUTABLE(factorial my_main.c factorial.c)
+ TARGET_LINK_LIBRARIES(factorial dbug)
+ENDIF()
IF(NOT WIN32 AND NOT CMAKE_GENERATOR MATCHES Xcode)
FIND_PROGRAM(GROFF groff)
@@ -36,11 +38,11 @@ IF(NOT WIN32 AND NOT CMAKE_GENERATOR MATCHES Xcode)
SET(SOURCE_INC factorial.r main.r example1.r example2.r example3.r)
ADD_CUSTOM_COMMAND(OUTPUT ${OUTPUT_INC}
DEPENDS factorial
- COMMAND ./factorial 1 2 3 4 5 > output1.r
- COMMAND ./factorial -\#t:o 2 3 > output2.r
- COMMAND ./factorial -\#d:t:o 3 > output3.r
- COMMAND ./factorial -\#d,result:o 4 > output4.r
- COMMAND ./factorial -\#d:f,factorial:F:L:o 3 > output5.r)
+ COMMAND factorial 1 2 3 4 5 > output1.r
+ COMMAND factorial -\#t:o 2 3 > output2.r
+ COMMAND factorial -\#d:t:o 3 > output3.r
+ COMMAND factorial -\#d,result:o 4 > output4.r
+ COMMAND factorial -\#d:f,factorial:F:L:o 3 > output5.r)
FOREACH(file ${SOURCE_INC})
STRING(REGEX REPLACE "\\.r" ".c" srcfile ${file})
ADD_CUSTOM_COMMAND(OUTPUT ${file} DEPENDS ${srcfile}