Mercurial > archived > louis > epitech > mq > rathaxes
annotate maintainers_refactor_the_build_system_to_allow_standalone_rathaxes_projects_with_cmake.patch @ 51:b109c72d897b
Start a series to fix a bit the build system
author | Louis Opter <louis@lse.epitech.net> |
---|---|
date | Sun, 22 Jan 2012 18:31:23 +0100 |
parents | maintainers_update_the_binaries_installed_with_make_install.patch@1cf60e316d19 |
children | 0ca794649028 |
rev | line source |
---|---|
46
1cf60e316d19
Finish the patch on the doc and start a patch to fix the "rathaxes" binaries
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
1 # HG changeset patch |
51
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
2 # Parent 656d49c6f011212578c0a29e49c4d1566b8ad16e |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
3 maintainers: make UseRathaxes.cmake usable in standalone projects |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
4 |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
5 - UseRathaxes now does more Rathaxes related things (like search for |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
6 Codeworker); |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
7 - Currently used by the examples; |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
8 - Should make the first steps guide really usable now. |
46
1cf60e316d19
Finish the patch on the doc and start a patch to fix the "rathaxes" binaries
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
9 |
51
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
10 diff --git a/CMakeLists.txt b/CMakeLists.txt |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
11 --- a/CMakeLists.txt |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
12 +++ b/CMakeLists.txt |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
13 @@ -27,27 +27,17 @@ |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
14 |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
15 SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${RATHAXES_SOURCE_DIR}/maintainers/CMakeScripts) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
16 |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
17 +INCLUDE(UseRathaxes) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
18 FIND_PACKAGE(LATEX) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
19 -FIND_PACKAGE(CodeWorker REQUIRED) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
20 -FIND_PACKAGE(LinuxKBuildDir) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
21 |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
22 INCLUDE(AddFileDependencies) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
23 INCLUDE(FileCopy) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
24 INCLUDE(RathaxesCopyLatexClasses) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
25 -INCLUDE(UseRathaxes) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
26 - |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
27 -IF (CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT LINUX_KBUILD_DIR) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
28 - MESSAGE(STATUS "No valid Linux build tree found, kernel modules will not be built") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
29 -ENDIF (CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT LINUX_KBUILD_DIR) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
30 |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
31 # Global definitions ########################################################### |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
32 |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
33 ENABLE_TESTING() |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
34 |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
35 -IF (CMAKE_COMPILER_IS_GNUCC) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
36 - SET(CMAKE_C_FLAGS "-pipe -Wextra -Wall -std=c99") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
37 -ENDIF (CMAKE_COMPILER_IS_GNUCC) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
38 - |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
39 # Subdirectories ############################################################### |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
40 |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
41 IF (PDFLATEX_COMPILER AND PS2PDF_CONVERTER) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
42 diff --git a/maintainers/CMakeLists.txt b/maintainers/CMakeLists.txt |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
43 --- a/maintainers/CMakeLists.txt |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
44 +++ b/maintainers/CMakeLists.txt |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
45 @@ -10,6 +10,6 @@ |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
46 INSTALL(PROGRAMS ${CODEWORKER_BINARY_PATH} |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
47 DESTINATION lib/rathaxes/) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
48 |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
49 -# Generate the install rules for the rathaxes binaries: |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
50 +# Generate the install rules for the rathaxes binaries |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
51 |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
52 ADD_SUBDIRECTORY(bin) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
53 diff --git a/maintainers/CMakeScripts/FindCodeWorker.cmake b/maintainers/CMakeScripts/FindCodeWorker.cmake |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
54 --- a/maintainers/CMakeScripts/FindCodeWorker.cmake |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
55 +++ b/maintainers/CMakeScripts/FindCodeWorker.cmake |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
56 @@ -18,7 +18,11 @@ |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
57 NAMES |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
58 codeworker |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
59 PATHS |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
60 - $ENV{CODEWORKER_DIR}) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
61 + $ENV{CODEWORKER_DIR} |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
62 + $ENV{RATHAXES_PATH}/lib/ |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
63 + ${CMAKE_SYSTEM_LIBRARY_PATH} |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
64 + PATH_SUFFIXES |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
65 + rathaxes) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
66 |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
67 # Else try to download it: |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
68 IF (NOT CODEWORKER_BINARY_PATH) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
69 diff --git a/maintainers/CMakeScripts/UseRathaxes.cmake b/maintainers/CMakeScripts/UseRathaxes.cmake |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
70 --- a/maintainers/CMakeScripts/UseRathaxes.cmake |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
71 +++ b/maintainers/CMakeScripts/UseRathaxes.cmake |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
72 @@ -1,3 +1,5 @@ |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
73 +# Functions #################################################################### |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
74 + |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
75 FUNCTION(_RTX_PARSE_OPTIONS ARGS RTI_OUT BLT_OUT SYSTEM_OUT) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
76 SET(OPTIONS "RTI" "BLT" "SYSTEM") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
77 SET(FILE_LISTS ${RTI_OUT} ${BLT_OUT} ${SYSTEM_OUT}) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
78 @@ -188,7 +190,7 @@ |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
79 # Generate the Linux Makefile to build a Linux kernel module |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
80 SET(MODULE_MAKEFILE "${MODULE_BUILD_DIR}/Makefile") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
81 SET(LKM_OBJECTS "${RATHAXES_SOURCE}_${SYSTEM}.o") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
82 - CONFIGURE_FILE("${RATHAXES_SOURCE_DIR}/maintainers/CMakeScripts/Templates/MakefileLKM.in" |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
83 + CONFIGURE_FILE("${CMAKE_CURRENT_LIST_DIR}/Templates/MakefileLKM.in" |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
84 "${MODULE_MAKEFILE}") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
85 |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
86 SET(KERNEL_OBJECT_NAME "${RATHAXES_SOURCE}_${SYSTEM}.ko") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
87 @@ -216,11 +218,11 @@ |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
88 # Generate the Windows Makefile to build a Windows kernel module |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
89 SET(MODULE_SOURCES "${MODULE_BUILD_DIR}/sources") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
90 SET(LKM_SOURCES "${RATHAXES_SOURCE}_${SYSTEM}.c") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
91 - CONFIGURE_FILE("${RATHAXES_SOURCE_DIR}/maintainers/CMakeScripts/Templates/sources.in" |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
92 + CONFIGURE_FILE("${CMAKE_CURRENT_LIST_DIR}/Templates/sources.in" |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
93 "${MODULE_SOURCES}") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
94 |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
95 SET(WINDOWS_MAKEFILE |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
96 - "${RATHAXES_SOURCE_DIR}/maintainers/CMakeScripts/Templates/Windows_Makefile") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
97 + "${CMAKE_CURRENT_LIST_DIR}/Templates/Windows_Makefile") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
98 |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
99 SET(KERNEL_OBJECT_NAME "${RATHAXES_SOURCE}_${SYSTEM}.sys") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
100 ADD_CUSTOM_COMMAND(OUTPUT "${KERNEL_OBJECT_NAME}" |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
101 @@ -237,3 +239,24 @@ |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
102 MESSAGE(STATUS "Don't know how to build kernel modules for ${SYSTEM} (yet)") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
103 ENDIF (${SYSTEM} MATCHES "Linux") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
104 ENDFUNCTION(ADD_RATHAXES_LKM NAME RATHAXES_SOURCE) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
105 + |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
106 +# Code ######################################################################### |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
107 + |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
108 +# Find additional dependencies: |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
109 + |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
110 +FIND_PACKAGE(CodeWorker REQUIRED) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
111 + |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
112 +# Only do this on Linux, as far as I know nobody compiles Linux from another OS. |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
113 +IF (CMAKE_SYSTEM_NAME MATCHES "Linux") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
114 + FIND_PACKAGE(LinuxKBuildDir) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
115 + IF (LINUX_KBUILD_DIR) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
116 + MESSAGE(STATUS "No valid Linux build tree found, Linux kernel modules will not be built") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
117 + ENDIF (LINUX_KBUILD_DIR) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
118 +ENDIF (CMAKE_SYSTEM_NAME MATCHES "Linux") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
119 + |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
120 +# Set some compiler options: |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
121 + |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
122 +# Set some sane flags that should be used in every project made with Rathaxes |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
123 +IF (CMAKE_COMPILER_IS_GNUCC) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
124 + SET(CMAKE_C_FLAGS "-pipe -Wextra -Wall -std=c99") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
125 +ENDIF (CMAKE_COMPILER_IS_GNUCC) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
126 diff --git a/maintainers/bin/rathaxes.bat b/maintainers/bin/rathaxes.bat |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
127 --- a/maintainers/bin/rathaxes.bat |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
128 +++ b/maintainers/bin/rathaxes.bat |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
129 @@ -1,6 +1,3 @@ |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
130 @echo off |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
131 |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
132 -rem We have to explicitely give the path of the script as the first argument on |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
133 -rem Windows. |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
134 - |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
135 %CODEWORKER% --quiet %INCLUDE_PATHS% -script %COMPILER_PATH%/rathaxes.cws -args %COMPILER_PATH%/rathaxes.cws %LOCAL_CACHE_PATH% %* |
46
1cf60e316d19
Finish the patch on the doc and start a patch to fix the "rathaxes" binaries
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
136 diff --git a/maintainers/bin/rathaxesvars.bat.in b/maintainers/bin/rathaxesvars.bat.in |
1cf60e316d19
Finish the patch on the doc and start a patch to fix the "rathaxes" binaries
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
137 --- a/maintainers/bin/rathaxesvars.bat.in |
1cf60e316d19
Finish the patch on the doc and start a patch to fix the "rathaxes" binaries
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
138 +++ b/maintainers/bin/rathaxesvars.bat.in |
51
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
139 @@ -2,6 +2,11 @@ |
46
1cf60e316d19
Finish the patch on the doc and start a patch to fix the "rathaxes" binaries
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
140 |
1cf60e316d19
Finish the patch on the doc and start a patch to fix the "rathaxes" binaries
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
141 echo -- Setting up the Rathaxes environment |
1cf60e316d19
Finish the patch on the doc and start a patch to fix the "rathaxes" binaries
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
142 |
51
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
143 +rem This variable is simply used as a shortcut to the Rathaxes install |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
144 +rem directory (since we never know where it can be on Windows). Useful to |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
145 +rem specify some paths in the documentation. This is also used by the |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
146 +rem FindCodeWorker CMake finder. |
46
1cf60e316d19
Finish the patch on the doc and start a patch to fix the "rathaxes" binaries
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
147 +set RATHAXES_PATH="%CD%" |
1cf60e316d19
Finish the patch on the doc and start a patch to fix the "rathaxes" binaries
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
148 set CNORM_PATH="%CD%@CNORM_PATH@" |
1cf60e316d19
Finish the patch on the doc and start a patch to fix the "rathaxes" binaries
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
149 set COMPILER_PATH="%CD%@COMPILER_PATH@" |
1cf60e316d19
Finish the patch on the doc and start a patch to fix the "rathaxes" binaries
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
150 set LOCAL_CACHE_PATH="%LOCALAPPDATA%\\Rathaxes\\cache\\" |
51
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
151 diff --git a/rathaxes/CMakeLists.txt b/rathaxes/CMakeLists.txt |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
152 --- a/rathaxes/CMakeLists.txt |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
153 +++ b/rathaxes/CMakeLists.txt |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
154 @@ -26,4 +26,21 @@ |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
155 |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
156 INSTALL(DIRECTORY compiler DESTINATION lib/rathaxes |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
157 PATTERN compiler/tests EXCLUDE) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
158 -INSTALL(DIRECTORY samples DESTINATION share/doc/rathaxes) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
159 +INSTALL(DIRECTORY samples DESTINATION share/doc/rathaxes |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
160 + PATTERN "SamplesCMakeLists.txt" EXCLUDE) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
161 + |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
162 +# Install rules for the "standalone" build system to generate the examples: |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
163 + |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
164 +# Top-level CMakeLists.txt |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
165 +INSTALL(FILES samples/SamplesCMakeLists.txt |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
166 + DESTINATION share/doc/rathaxes/samples |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
167 + RENAME CMakeLists.txt) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
168 +# CMakeScripts |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
169 +INSTALL(FILES |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
170 + ${RATHAXES_SOURCE_DIR}/maintainers/CMakeScripts/UseRathaxes.cmake |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
171 + ${RATHAXES_SOURCE_DIR}/maintainers/CMakeScripts/FindCodeWorker.cmake |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
172 + ${RATHAXES_SOURCE_DIR}/maintainers/CMakeScripts/FindLinuxKBuildDir.cmake |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
173 + DESTINATION share/doc/rathaxes/samples/CMakeScripts/) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
174 +# Templates used by the CMakeScripts |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
175 +INSTALL(DIRECTORY ${RATHAXES_SOURCE_DIR}/maintainers/CMakeScripts/Templates |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
176 + DESTINATION share/doc/rathaxes/samples/CMakeScripts/Template/) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
177 diff --git a/rathaxes/samples/SamplesCMakeLists.txt b/rathaxes/samples/SamplesCMakeLists.txt |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
178 new file mode 100644 |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
179 --- /dev/null |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
180 +++ b/rathaxes/samples/SamplesCMakeLists.txt |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
181 @@ -0,0 +1,12 @@ |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
182 +PROJECT(RTX_SAMPLES C) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
183 + |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
184 +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
185 + |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
186 +INCLUDE(CMakeScripts/UseRathaxes) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
187 + |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
188 +ENABLE_TESTING() |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
189 + |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
190 +ADD_SUBDIRECTORY(helloworld) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
191 +ADD_SUBDIRECTORY(syntax) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
192 +ADD_SUBDIRECTORY(e1000) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
193 +ADD_SUBDIRECTORY(windows_minimal_lkm) |