comparison rathaxes_replace_generate_by_a_cmakelist.patch @ 0:973e7bc6d13c

Add some patches to use and test rathaxes with CMake
author Louis Opter <louis@lse.epitech.net>
date Sun, 01 Jan 2012 15:31:17 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:973e7bc6d13c
1 # HG changeset patch
2 # Parent f9f6458ed45071bb998561fd096551d102f8534d
3 rathaxes: replace the generate script for the helloworld sample by a simpler CMakeLists.txt
4
5 diff --git a/rathaxes/CMakeLists.txt b/rathaxes/CMakeLists.txt
6 --- a/rathaxes/CMakeLists.txt
7 +++ b/rathaxes/CMakeLists.txt
8 @@ -1,4 +1,5 @@
9 ADD_SUBDIRECTORY(compiler)
10 +ADD_SUBDIRECTORY(samples)
11
12 # Generate a rathaxes binary script that set up all the path automatically
13 # thanks to CMake.
14 diff --git a/rathaxes/samples/CMakeLists.txt b/rathaxes/samples/CMakeLists.txt
15 new file mode 100644
16 --- /dev/null
17 +++ b/rathaxes/samples/CMakeLists.txt
18 @@ -0,0 +1,1 @@
19 +ADD_SUBDIRECTORY(helloworld)
20 diff --git a/rathaxes/samples/helloworld/CMakeLists.txt b/rathaxes/samples/helloworld/CMakeLists.txt
21 new file mode 100644
22 --- /dev/null
23 +++ b/rathaxes/samples/helloworld/CMakeLists.txt
24 @@ -0,0 +1,4 @@
25 +ADD_RATHAXES_EXECUTABLE(hello hello.rtx
26 + RTI types.rti main.rti log.rti
27 + BLT types.blt log.blt main.blt
28 + SYSTEM linux)
29 diff --git a/rathaxes/samples/helloworld/generate b/rathaxes/samples/helloworld/generate
30 deleted file mode 100755
31 --- a/rathaxes/samples/helloworld/generate
32 +++ /dev/null
33 @@ -1,31 +0,0 @@
34 -#!/bin/sh
35 -
36 -msg() {
37 - echo "\033[1;32m-->\033[0m $*"
38 -}
39 -
40 -compiler=${1:-rathaxes}
41 -
42 -if ! type $compiler >/dev/null ; then
43 - msg "Cannot find the rathaxes compiler, install it or provide it like:"
44 - msg "$0 /path/to/rathaxes"
45 - exit 1
46 -fi
47 -
48 -msg "clearing cache"
49 -$compiler cache clear
50 -
51 -set -e
52 -
53 -for f in types.rti main.rti log.rti ; do
54 - msg "registering rti $f"
55 - $compiler rti-register $f
56 -done
57 -
58 -for f in types.blt log.blt main.blt ; do
59 - msg "registring blt $f"
60 - $compiler blt-register $f
61 -done
62 -
63 -msg "generating for Linux"
64 -$compiler generate linux hello.rtx