Mercurial > archived > louis > epitech > mq > rathaxes
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rathaxes_replace_generate_by_a_cmakelist.patch Sun Jan 01 15:31:17 2012 +0100 @@ -0,0 +1,64 @@ +# HG changeset patch +# Parent f9f6458ed45071bb998561fd096551d102f8534d +rathaxes: replace the generate script for the helloworld sample by a simpler CMakeLists.txt + +diff --git a/rathaxes/CMakeLists.txt b/rathaxes/CMakeLists.txt +--- a/rathaxes/CMakeLists.txt ++++ b/rathaxes/CMakeLists.txt +@@ -1,4 +1,5 @@ + ADD_SUBDIRECTORY(compiler) ++ADD_SUBDIRECTORY(samples) + + # Generate a rathaxes binary script that set up all the path automatically + # thanks to CMake. +diff --git a/rathaxes/samples/CMakeLists.txt b/rathaxes/samples/CMakeLists.txt +new file mode 100644 +--- /dev/null ++++ b/rathaxes/samples/CMakeLists.txt +@@ -0,0 +1,1 @@ ++ADD_SUBDIRECTORY(helloworld) +diff --git a/rathaxes/samples/helloworld/CMakeLists.txt b/rathaxes/samples/helloworld/CMakeLists.txt +new file mode 100644 +--- /dev/null ++++ b/rathaxes/samples/helloworld/CMakeLists.txt +@@ -0,0 +1,4 @@ ++ADD_RATHAXES_EXECUTABLE(hello hello.rtx ++ RTI types.rti main.rti log.rti ++ BLT types.blt log.blt main.blt ++ SYSTEM linux) +diff --git a/rathaxes/samples/helloworld/generate b/rathaxes/samples/helloworld/generate +deleted file mode 100755 +--- a/rathaxes/samples/helloworld/generate ++++ /dev/null +@@ -1,31 +0,0 @@ +-#!/bin/sh +- +-msg() { +- echo "\033[1;32m-->\033[0m $*" +-} +- +-compiler=${1:-rathaxes} +- +-if ! type $compiler >/dev/null ; then +- msg "Cannot find the rathaxes compiler, install it or provide it like:" +- msg "$0 /path/to/rathaxes" +- exit 1 +-fi +- +-msg "clearing cache" +-$compiler cache clear +- +-set -e +- +-for f in types.rti main.rti log.rti ; do +- msg "registering rti $f" +- $compiler rti-register $f +-done +- +-for f in types.blt log.blt main.blt ; do +- msg "registring blt $f" +- $compiler blt-register $f +-done +- +-msg "generating for Linux" +-$compiler generate linux hello.rtx