Mercurial > projects > qtd
annotate cmake/FindD.cmake @ 401:827147052d8d
Corrected typo in CMake error message, fixes #68.
author | David Nadlinger <code@klickverbot.at> |
---|---|
date | Thu, 17 Mar 2011 19:11:40 +0100 |
parents | d2f48c4cb3e3 |
children | 8564ab82ea42 |
rev | line source |
---|---|
132 | 1 ##-------------------------------------------- |
2 ## Variables. | |
3 ##-------------------------------------------- | |
4 | |
235
b796329e8c38
We need to start cmake twice. It is necessary for getting a class list from the generator and using this list for building other parts of QtD.
SokoL_SD
parents:
224
diff
changeset
|
5 ## Find D compiler and parse its version. |
166 | 6 find_program(DC NAMES dmd ldc) |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
7 if (DC) |
132 | 8 get_filename_component(dc_path ${DC} PATH) |
9 if("${dc_path}" STREQUAL ${CMAKE_BINARY_DIR}) | |
10 get_filename_component(DC ${DC} NAME) | |
11 endif("${dc_path}" STREQUAL ${CMAKE_BINARY_DIR}) | |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
12 exec_program(${DC} ARGS "" OUTPUT_VARIABLE d_output) |
132 | 13 string(REGEX MATCH "Digital Mars D Compiler v[0-9]\\.[0-9]+" dmd_version "${d_output}") |
14 if (dmd_version) | |
15 set(D_IS_MARS true) | |
16 set(D_IS_DMD true) | |
17 set(D_COMPILER_NAME "Digital Mars D Compiler") | |
18 string(REGEX REPLACE "Digital Mars D Compiler v([0-9])\\.[0-9]+" "\\1" D_VERSION "${dmd_version}") | |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
19 string(REGEX REPLACE "Digital Mars D Compiler v[0-9]\\.([0-9]+)" "\\1" D_FRONTEND "${dmd_version}") |
132 | 20 else (dmd_version) |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
21 string(REGEX MATCH "LLVM-based D Compiler" is_ldc "${d_output}") |
132 | 22 if (is_ldc) |
23 exec_program(${DC} ARGS "--version" OUTPUT_VARIABLE d_output) | |
24 string(REGEX MATCH "based on DMD v[0-9]\\.[0-9]+" ldc_version "${d_output}") | |
25 set(D_IS_LLVM true) | |
26 set(D_IS_LDC true) | |
27 if(ldc_version) | |
28 set(D_IS_LLVM true) | |
29 set(D_COMPILER_NAME "LLVM-based D Compiler") | |
30 string(REGEX REPLACE "based on DMD v([0-9])\\.[0-9]+" "\\1" D_VERSION "${ldc_version}") | |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
31 string(REGEX REPLACE "based on DMD v[0-9]\\.([0-9]+)" "\\1" D_FRONTEND "${ldc_version}") |
132 | 32 else(ldc_version) |
235
b796329e8c38
We need to start cmake twice. It is necessary for getting a class list from the generator and using this list for building other parts of QtD.
SokoL_SD
parents:
224
diff
changeset
|
33 message(FATAL_ERROR "LDC compiler found, but the version can not be processed") |
132 | 34 endif(ldc_version) |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
35 else (is_ldc) |
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
36 message(FATAL_ERROR "D compiler is not found") |
132 | 37 endif(is_ldc) |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
38 endif(dmd_version) |
132 | 39 message(STATUS "D compiler found -- ${D_COMPILER_NAME} v${D_VERSION}.${D_FRONTEND}") |
40 else (DC) | |
401
827147052d8d
Corrected typo in CMake error message, fixes #68.
David Nadlinger <code@klickverbot.at>
parents:
384
diff
changeset
|
41 message(FATAL_ERROR "D compiler is not found") |
132 | 42 endif (DC) |
43 | |
44 ## Get D compiler path. | |
45 get_filename_component(DC_PATH ${DC} PATH) | |
46 if("${DC_PATH}" STREQUAL "") | |
47 find_program(dc_path_tmp ${DC}) | |
48 get_filename_component(DC_PATH ${dc_path_tmp} PATH) | |
49 mark_as_advanced(dc_path_tmp) | |
50 endif("${DC_PATH}" STREQUAL "") | |
51 get_filename_component(dc_parent_dir ${DC_PATH} NAME) | |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
52 if("${dc_parent_dir}" STREQUAL "bin") |
132 | 53 get_filename_component(DC_PATH ${DC_PATH} PATH) |
54 endif("${dc_parent_dir}" STREQUAL "bin") | |
55 | |
56 #option(ONE_BUILD_COMMAND "Build in one command" "OFF") | |
57 set(ONE_BUILD_COMMAND OFF) ## TODO: test it and uncomment the previous line. | |
58 | |
59 if (NOT ONE_BUILD_COMMAND) | |
60 if(D_IS_MARS) | |
281
7f2e3ffa1c33
Workaround of the major dmd/optlink bug. All examples that failed on Windows now work.
eldar
parents:
275
diff
changeset
|
61 set(opt_tmp "ON") |
132 | 62 else(D_IS_MARS) |
281
7f2e3ffa1c33
Workaround of the major dmd/optlink bug. All examples that failed on Windows now work.
eldar
parents:
275
diff
changeset
|
63 set(opt_tmp "OFF") |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
64 endif(D_IS_MARS) |
132 | 65 option(SINGLE_D_OBJECT "Build all d sources to one object file" ${opt_tmp}) |
181 | 66 if(D_IS_LLVM) |
281
7f2e3ffa1c33
Workaround of the major dmd/optlink bug. All examples that failed on Windows now work.
eldar
parents:
275
diff
changeset
|
67 set(D_FLAGS ${D_FLAGS} -singleobj) |
181 | 68 endif(D_IS_LLVM) |
281
7f2e3ffa1c33
Workaround of the major dmd/optlink bug. All examples that failed on Windows now work.
eldar
parents:
275
diff
changeset
|
69 if(CMAKE_HOST_WIN32 AND D_IS_MARS) |
7f2e3ffa1c33
Workaround of the major dmd/optlink bug. All examples that failed on Windows now work.
eldar
parents:
275
diff
changeset
|
70 set(D_MODULES_PER_OBJECT 200 CACHE STRING "Max number of modules per object file") |
7f2e3ffa1c33
Workaround of the major dmd/optlink bug. All examples that failed on Windows now work.
eldar
parents:
275
diff
changeset
|
71 else(CMAKE_HOST_WIN32 AND D_IS_MARS) |
7f2e3ffa1c33
Workaround of the major dmd/optlink bug. All examples that failed on Windows now work.
eldar
parents:
275
diff
changeset
|
72 set(D_MODULES_PER_OBJECT 10000 CACHE STRING "Max number of modules per object file") |
7f2e3ffa1c33
Workaround of the major dmd/optlink bug. All examples that failed on Windows now work.
eldar
parents:
275
diff
changeset
|
73 endif(CMAKE_HOST_WIN32 AND D_IS_MARS) |
132 | 74 endif(NOT ONE_BUILD_COMMAND) |
75 | |
235
b796329e8c38
We need to start cmake twice. It is necessary for getting a class list from the generator and using this list for building other parts of QtD.
SokoL_SD
parents:
224
diff
changeset
|
76 ## Specific flags for build configurations. |
132 | 77 ## TODO: Add another targets. |
78 set(D_RELEASE_FLAGS -O -release) | |
139 | 79 set(D_DEBUG_FLAGS -g ) |
132 | 80 if(D_IS_LLVM) |
81 set(D_RELEASE_FLAGS ${D_RELEASE_FLAGS} -enable-inlining) | |
273 | 82 set(D_VERSION_FLAG -d-version) |
274 | 83 set(D_DEBUG_FLAG -d-debug) |
132 | 84 else(D_IS_LLVM) |
85 set(D_RELEASE_FLAGS ${D_RELEASE_FLAGS} -inline) | |
273 | 86 set(D_VERSION_FLAG -version) |
274 | 87 set(D_DEBUG_FLAG -debug) |
132 | 88 endif(D_IS_LLVM) |
89 if(CMAKE_HOST_WIN32) | |
368
185df9220ea7
Fixed startsWith. Implemented meta-object members as ranges. Freed QMetaObject from stuff that belongs to MetaClass
Max Samukha <maxter@maxter.com>
parents:
366
diff
changeset
|
90 # Linking fails with this. Commenting out for now. |
185df9220ea7
Fixed startsWith. Implemented meta-object members as ranges. Freed QMetaObject from stuff that belongs to MetaClass
Max Samukha <maxter@maxter.com>
parents:
366
diff
changeset
|
91 # set(D_RELEASE_FLAGS ${D_RELEASE_FLAGS} -L/subsystem:windows) |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
92 endif(CMAKE_HOST_WIN32) |
274 | 93 set(D_DEBUG_FLAGS ${D_DEBUG_FLAGS} ${D_DEBUG_FLAG}) |
139 | 94 |
273 | 95 # Unittest flags. |
96 option(UNITTEST "Includes unittests" "OFF") | |
97 if(UNITTEST) | |
98 set(D_FLAGS ${D_FLAGS} -unittest) | |
99 endif(UNITTEST) | |
132 | 100 |
101 ## Settings. | |
102 if(CMAKE_HOST_WIN32) | |
103 set(D_OBJECT_SUFFIX .obj) | |
104 if(D_IS_MARS) | |
105 set(D_LIB_SUFFIX .lib) | |
106 set(D_LIB_PREFIX ) | |
107 elseif(D_IS_LDC) | |
108 set(D_LIB_SUFFIX .a) | |
109 set(D_LIB_PREFIX lib) | |
110 endif(D_IS_MARS) | |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
111 elseif(CMAKE_HOST_UNIX) |
132 | 112 set(D_LIB_SUFFIX .a) |
113 set(D_LIB_PREFIX lib) | |
114 set(D_OBJECT_SUFFIX .o) | |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
115 endif(CMAKE_HOST_WIN32) |
132 | 116 |
117 ##-------------------------------------------- | |
224 | 118 ## Macros and functions. |
132 | 119 ##-------------------------------------------- |
120 | |
274 | 121 macro(add_d_flags option) |
273 | 122 foreach(arg_tmp ${ARGN}) |
274 | 123 set(D_FLAGS ${D_FLAGS} ${option}=${arg_tmp}) |
273 | 124 endforeach(arg_tmp ${ARGN}) |
274 | 125 endmacro(add_d_flags option) |
126 | |
127 macro(add_d_versions) | |
128 add_d_flags(${D_VERSION_FLAG} ${ARGN}) | |
273 | 129 endmacro(add_d_versions) |
130 | |
274 | 131 macro(add_d_debugs) |
132 add_d_flags(${D_DEBUG_FLAG} ${ARGN}) | |
133 endmacro(add_d_debugs) | |
134 | |
224 | 135 ## Make a native path. |
132 | 136 ## Usage: |
137 ## set(path c:/file_path/file_name.cpp) | |
138 ## make_native_path(path) | |
139 ## message(STATUS ${path}) | |
140 ## Output: | |
141 ## -- "c:\file_path\file_name.cpp" | |
384
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
368
diff
changeset
|
142 ## Command "file(TO_NATIVE_PATH ...)" gives incorrect results on Windows |
132 | 143 macro(make_native_path pathname) |
144 if(CMAKE_HOST_WIN32) | |
145 # An extra \\ escape is necessary to get a \ through CMake's processing. | |
146 string(REPLACE "/" "\\" ${pathname} "${${pathname}}") | |
147 # Enclose with UNESCAPED quotes. This means we need to escape our | |
148 # quotes once here, i.e. with \" | |
149 set(${pathname} \"${${pathname}}\") | |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
150 endif(CMAKE_HOST_WIN32) |
132 | 151 endmacro(make_native_path) |
152 | |
153 ## | |
154 ## Example: | |
155 ## set(path 24.3+23.bin) | |
156 ## obj_path(path) | |
157 ## message(STATUS ${path}) | |
158 ## Example output: | |
159 ## -- 24\.3\+23\.bin | |
160 macro(regex_safe_string outvariable) | |
161 set(${outvariable} ${ARGN}) | |
162 set(__regex_chars__ ^ $ . ] [ - * + ? | \( \)) | |
163 foreach(__regex_char__ ${__regex_chars__}) | |
164 string(REPLACE "${__regex_char__}" | |
165 "\\${__regex_char__}" ${outvariable} ${${outvariable}} | |
166 ) | |
167 endforeach(__regex_char__ ${__regex_chars__}) | |
168 endmacro(regex_safe_string outvariable) | |
169 | |
170 ## Remove unnecessary path to the object file. | |
171 ## path -- path to object file. | |
172 ## Example: | |
173 ## set(path ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/target.dir/main.d.obj) | |
174 ## obj_path(path) | |
175 ## message(STATUS ${path}) | |
176 ## Example output: | |
177 ## -- CMakeFiles/target.dir/main.d.obj | |
178 macro(obj_path path) | |
179 regex_safe_string(cbd_safe_tmp ${CMAKE_CURRENT_BINARY_DIR}) | |
180 regex_safe_string(csd_safe_tmp ${CMAKE_CURRENT_SOURCE_DIR}) | |
181 set(regexp_str_tmp "(${cbd_safe_tmp}/|${csd_safe_tmp}/|)(.+)") | |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
182 string(REGEX REPLACE ${regexp_str_tmp} "\\2" ${path} "${${path}}") |
132 | 183 endmacro(obj_path path) |
184 | |
185 ## Compile d files. | |
186 ## target -- name of a new target. | |
187 ## objects_list -- created object files. | |
188 ## params -- sources files. | |
189 macro(compile_d_files target objects_list) | |
190 set(${objects_list}) | |
191 set(tmp_dir_tmp ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${target}.dir) | |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
192 |
132 | 193 set(type_tmp SOURCES) |
194 set(SOURCES_tmp ) | |
195 set(FLAGS_tmp ) | |
196 | |
197 ## Parse parameters list. | |
198 set(params_tmp SOURCES FLAGS) | |
199 foreach(arg_tmp ${ARGN}) | |
215 | 200 set(found_type_tmp) |
201 if(NOT found_type_tmp) | |
132 | 202 foreach(param_tmp ${params_tmp}) |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
203 if(arg_tmp STREQUAL param_tmp) |
132 | 204 set(type_tmp ${param_tmp}) |
215 | 205 set(found_type_tmp 1) |
132 | 206 break(param_tmp ${params_tmp}) |
207 endif(arg_tmp STREQUAL param_tmp) | |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
208 endforeach(param_tmp ${params_tmp}) |
215 | 209 endif(NOT found_type_tmp) |
210 if(NOT found_type_tmp) | |
132 | 211 set(${type_tmp}_tmp ${${type_tmp}_tmp} ${arg_tmp}) |
215 | 212 endif(NOT found_type_tmp) |
132 | 213 endforeach(arg_tmp ${ARGN}) |
214 | |
215 if(NOT SINGLE_D_OBJECT) | |
216 set(${objects_list}) | |
217 foreach (d_source_p_tmp ${SOURCES_tmp}) | |
218 get_filename_component(ext_tmp ${d_source_p_tmp} EXT) | |
219 find_file(d_source_p_tmp ${d_source_p_tmp} PATHS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} | |
220 ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}) | |
221 set (d_source_tmp ${d_source_p_tmp}) | |
222 obj_path(d_source_tmp) | |
223 set(d_obj_tmp ${tmp_dir_tmp}/${d_source_tmp}${D_OBJECT_SUFFIX}) | |
224 set(${objects_list} ${${objects_list}} ${d_obj_tmp}) | |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
225 get_filename_component(path_tmp ${d_obj_tmp} PATH) |
132 | 226 file(MAKE_DIRECTORY ${path_tmp}) |
227 set(d_obj_out_tmp ${d_obj_tmp}) | |
228 obj_path(d_obj_out_tmp) | |
229 #get_imported_files(depends_tmp ${d_source_p_tmp}) ## Too slow..... | |
230 add_custom_command(OUTPUT "${d_obj_tmp}" | |
231 COMMAND "${DC}" | |
232 ARGS ${FLAGS_tmp} ${d_source_p_tmp} -c -of${d_obj_tmp} | |
233 COMMENT "Building ${d_obj_out_tmp}" | |
234 DEPENDS ${d_source_p} ${depends_tmp} | |
235 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | |
236 ) | |
237 endforeach (d_source_p_tmp ${SOURCES_tmp}) | |
238 else(NOT SINGLE_D_OBJECT) | |
274 | 239 if(D_IS_LDC) |
273 | 240 set(FLAGS_tmp ${FLAGS_tmp} -oq ) |
274 | 241 endif(D_IS_LDC) |
181 | 242 set(count_objects_tmp 0) |
243 set(files${count_objects_tmp}_tmp ) | |
244 set(counter_tmp 0) | |
245 set(files_tmp ) | |
246 set(objects_tmp ) | |
247 foreach (d_source_p_tmp ${SOURCES_tmp}) | |
248 math(EXPR counter_tmp "${counter_tmp} + 1") | |
249 set(files${count_objects_tmp}_tmp ${files${count_objects_tmp}_tmp} ${d_source_p_tmp}) | |
250 if(counter_tmp GREATER D_MODULES_PER_OBJECT) | |
251 math(EXPR count_objects_tmp "${count_objects_tmp} + 1") | |
252 set(files${count_objects_tmp}_tmp ) | |
253 set(counter_tmp 0) | |
254 endif(counter_tmp GREATER D_MODULES_PER_OBJECT) | |
255 endforeach (d_source_p_tmp ${SOURCES_tmp}) | |
256 | |
257 if(files${count_objects_tmp}_tmp) | |
258 math(EXPR count_objects_tmp "${count_objects_tmp} + 1") | |
259 endif(files${count_objects_tmp}_tmp) | |
260 | |
261 set(id_tmp 0) | |
262 while(id_tmp LESS ${count_objects_tmp}) | |
263 set(object_tmp ${tmp_dir_tmp}/${target}${id_tmp}${D_OBJECT_SUFFIX}) | |
264 set(d_obj_out_tmp ${${object_tmp}}) | |
265 obj_path(d_obj_out_tmp) | |
266 set(parameters_tmp ${FLAGS_tmp} -c ${files${id_tmp}_tmp} -of${object_tmp}) | |
267 set(parameters_list_file_tmp ${tmp_dir_tmp}/parameters${id_tmp}_obj) | |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
268 if(CMAKE_HOST_WIN32) |
181 | 269 file(REMOVE ${parameters_list_file_tmp}) |
270 foreach(arg_tmp ${parameters_tmp}) | |
271 file(APPEND ${parameters_list_file_tmp} "${arg_tmp}\n") | |
272 endforeach(arg_tmp) | |
273 set(param_tmp @${parameters_list_file_tmp}) | |
274 elseif(CMAKE_HOST_UNIX) | |
275 set(param_tmp ${parameters_tmp}) | |
276 endif(CMAKE_HOST_WIN32) | |
277 #get_imported_files(depends_tmp ${ARGN}) | |
278 add_custom_command(OUTPUT "${object_tmp}" | |
279 COMMAND "${DC}" | |
280 ARGS ${param_tmp} | |
281 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | |
282 DEPENDS ${files${id_tmp}_tmp} ${depends_tmp} | |
283 COMMENT "" | |
284 ) | |
285 set(objects_tmp ${objects_tmp} ${object_tmp}) | |
286 math(EXPR id_tmp "${id_tmp} + 1") | |
287 endwhile(id_tmp LESS ${count_objects_tmp}) | |
288 | |
289 set(${objects_list} ${objects_tmp}) | |
132 | 290 endif(NOT SINGLE_D_OBJECT) |
291 #add_custom_target(${target} DEPENDS "${${objects_list}}") | |
292 endmacro(compile_d_files objects_list) | |
293 | |
294 | |
295 ## Add D target. | |
296 ## name -- target name. | |
297 ## Params: | |
298 ## TYPE -- target type. | |
299 ## STATIC -- static library. | |
300 ## SHARED -- shared library. | |
301 ## BINARY -- executable. | |
302 ## SOURCES -- sources of the target. | |
303 ## INCLUDES -- include paths. | |
304 ## FLAGS -- build flags. | |
305 ## LIBS -- libraries for link. | |
306 ## LIB_PATHS -- libraries paths. | |
307 ## DEPENDS -- target depends. | |
308 macro(add_d_target name) | |
309 set(type_tmp SOURCES) | |
310 set(TYPE_tmp) | |
311 set(INCLUDES_tmp ) | |
312 set(FLAGS_tmp ) | |
313 set(SOURCES_tmp ) | |
203
d3383b16f1d7
Add a 'NO_DEPS_SOURCES' option to the 'add_d_target' macro. And use it for resources and forms in QtD examples.
SokoL_SD
parents:
181
diff
changeset
|
314 set(GEN_FILES_tmp ) |
132 | 315 set(OBJECTS_tmp ) |
316 set(LIBS_tmp ) | |
317 set(LIB_PATHS_tmp) | |
318 set(DEPENDS_tmp) | |
319 set(OUTPUT_PATH_tmp ) | |
320 set(compile_flags_tmp ${D_FLAGS}) | |
321 set(additional_commands_tmp ) | |
215 | 322 set(detect_deps_tmp 1) |
132 | 323 set(link_flags_tmp ) |
324 | |
325 ## Parse parameters list. | |
203
d3383b16f1d7
Add a 'NO_DEPS_SOURCES' option to the 'add_d_target' macro. And use it for resources and forms in QtD examples.
SokoL_SD
parents:
181
diff
changeset
|
326 set(params_tmp TYPE INCLUDES FLAGS SOURCES NO_DEPS_SOURCES OBJECTS LIBS LIB_PATHS DEPENDS OUTPUT_PATH) |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
327 |
132 | 328 foreach(arg_tmp ${ARGN}) |
215 | 329 set(found_type_tmp) |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
330 if(${arg_tmp} STREQUAL "NOT_DETECT_DEPENDS") |
215 | 331 set(detect_deps_tmp 0) |
332 set(found_type_tmp 1) | |
333 endif(${arg_tmp} STREQUAL "NOT_DETECT_DEPENDS") | |
334 if(NOT found_type_tmp) | |
132 | 335 foreach(param_tmp ${params_tmp}) |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
336 if(arg_tmp STREQUAL param_tmp) |
132 | 337 set(type_tmp ${param_tmp}) |
215 | 338 set(found_type_tmp 1) |
132 | 339 break(param_tmp ${params_tmp}) |
340 endif(arg_tmp STREQUAL param_tmp) | |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
341 endforeach(param_tmp ${params_tmp}) |
215 | 342 endif(NOT found_type_tmp) |
343 if(NOT found_type_tmp) | |
132 | 344 set(${type_tmp}_tmp ${${type_tmp}_tmp} ${arg_tmp}) |
215 | 345 endif(NOT found_type_tmp) |
132 | 346 endforeach(arg_tmp ${ARGN}) |
347 | |
348 ## Init target type. | |
349 if (OUTPUT_PATH_tmp) | |
350 set(output_name_tmp "${OUTPUT_PATH_tmp}") | |
351 endif (OUTPUT_PATH_tmp) | |
352 if("${TYPE_tmp}" STREQUAL "STATIC") | |
353 set(link_flags_tmp ${link_flags_tmp} -lib) | |
354 if(NOT OUTPUT_PATH_tmp) | |
355 if(ARCHIVE_OUTPUT_DIRECTORY) | |
356 set(output_name_tmp ${ARCHIVE_OUTPUT_DIRECTORY}) | |
357 else(ARCHIVE_OUTPUT_DIRECTORY) | |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
358 set(output_name_tmp ${CMAKE_CURRENT_BINARY_DIR}/lib) |
132 | 359 endif(ARCHIVE_OUTPUT_DIRECTORY) |
360 endif(NOT OUTPUT_PATH_tmp) | |
361 set(output_name_tmp ${output_name_tmp}/${D_LIB_PREFIX}${name}${D_LIB_SUFFIX}) | |
362 elseif("${TYPE_tmp}" STREQUAL "BINARY") | |
363 set(build_binary_tmp 1) | |
364 if(NOT OUTPUT_PATH_tmp) | |
365 if(RUNTIME_OUTPUT_DIRECTORY) | |
366 set(output_name ${RUNTIME_OUTPUT_DIRECTORY}) | |
367 else(RUNTIME_OUTPUT_DIRECTORY) | |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
368 set(output_name_tmp ${CMAKE_CURRENT_BINARY_DIR}/bin) |
132 | 369 endif(RUNTIME_OUTPUT_DIRECTORY) |
370 endif(NOT OUTPUT_PATH_tmp) | |
371 set(output_name_tmp ${output_name_tmp}/${name}${CMAKE_EXECUTABLE_SUFFIX}) | |
372 elseif("${TYPE_tmp}" STREQUAL "SHARED") | |
373 if(D_IS_MARS) | |
355
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
281
diff
changeset
|
374 message(FATAL_ERROR "DMD does not support building shared libraries") |
132 | 375 endif(D_IS_MARS) |
376 if(NOT OUTPUT_PATH_tmp) | |
377 if(LIBRARY_OUTPUT_DIRECTORY) | |
378 set(output_name_tmp ${LIBRARY_OUTPUT_DIRECTORY}) | |
379 else(LIBRARY_OUTPUT_DIRECTORY) | |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
380 set(output_name_tmp ${CMAKE_CURRENT_BINARY_DIR}/lib) |
132 | 381 endif(LIBRARY_OUTPUT_DIRECTORY) |
382 endif(NOT OUTPUT_PATH_tmp) | |
383 set(build_binary 1) | |
384 set(output_name_tmp ${output_name_tmp}/${CMAKE_SHARED_LIBRARY_PREFIX}${name}${CMAKE_SHARED_LIBRARY_SUFFIX}) | |
385 set(link_flags_tmp ${compile_flags_tmp} -L-shared) | |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
386 else("${TYPE_tmp}" STREQUAL "STATIC") |
132 | 387 message(FATAL_ERROR "D target ${TYPE_tmp} not supported") |
388 endif("${TYPE_tmp}" STREQUAL "STATIC") | |
389 | |
390 ## Include paths. | |
391 foreach(inc_tmp ${INCLUDES_tmp} ${D_INCLUDES}) | |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
392 set(compile_flags_tmp ${compile_flags_tmp} -I${inc_tmp}) |
132 | 393 endforeach(inc_tmp ${INCLUDES_tmp} ${D_INCLUDES}) |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
394 |
132 | 395 ## Libraries and paths of them. |
396 set(libs_tmp) | |
397 if(build_binary_tmp) | |
398 if(D_IS_MARS AND CMAKE_HOST_WIN32) | |
399 foreach(lib_path_tmp ${LIB_PATHS_tmp} ${D_LIB_PATHS}) | |
400 make_native_path(lib_path_tmp) | |
401 string(REPLACE "/" "\\" lib_path_tmp "${lib_path_tmp}//") | |
402 set(lib_path_tmp \"${lib_path_tmp}\") | |
403 set(link_flags_tmp ${link_flags_tmp} -L+${lib_path_tmp}) | |
404 endforeach(lib_path_tmp ${LIB_PATHS_tmp} ${D_LIB_PATHS}) | |
405 #set(additional_commands_tmp COMMAND set ARGS LIB=) | |
406 #foreach(lib_path_tmp ${LIB_PATHS_tmp} ${D_LIB_PATHS}) | |
407 #MAKE_NATIVE_PATH(lib_path_tmp) | |
408 #set(additional_commands_tmp ${additional_commands_tmp}${lib_path_tmp};) | |
409 #endforeach(lib_path_tmp ${LIB_PATHS_tmp} ${D_LIB_PATHS}) | |
410 else(D_IS_MARS AND CMAKE_HOST_WIN32) | |
411 foreach(lib_path_tmp ${LIB_PATHS_tmp} ${D_LIB_PATHS}) | |
412 set(link_flags_tmp ${link_flags_tmp} -L-L${lib_path_tmp}) | |
413 endforeach(lib_path_tmp ${LIB_PATHS_tmp} ${D_LIB_PATHS}) | |
414 endif(D_IS_MARS AND CMAKE_HOST_WIN32) | |
415 foreach(lib_tmp ${LIBS_tmp} ${D_LIBS}) | |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
416 if(D_IS_MARS AND CMAKE_HOST_WIN32) |
132 | 417 set(link_flags_tmp ${link_flags_tmp} -L+${lib_tmp}) |
418 else(D_IS_MARS AND CMAKE_HOST_WIN32) | |
419 set(link_flags_tmp ${link_flags_tmp} -L-l${lib_tmp}) | |
420 endif(D_IS_MARS AND CMAKE_HOST_WIN32) | |
421 endforeach(lib_tmp ${LIBS_tmp} ${D_LIBS}) | |
422 endif(build_binary_tmp) | |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
423 |
132 | 424 set(not_obj_tmp ${ONE_BUILD_COMMAND}) |
425 ## Ldc not support -lib flag. | |
426 if(ONE_BUILD_COMMAND AND ${TYPE_tmp} STREQUAL "STATIC" AND D_IS_LLVM) | |
427 set(not_obj_tmp OFF) | |
428 endif(ONE_BUILD_COMMAND AND ${TYPE_tmp} STREQUAL "STATIC" AND D_IS_LLVM) | |
429 | |
430 if(build_binary_tmp AND NOT D_IS_MARS) | |
431 set(compile_flags_tmp ${compile_flags_tmp} -od${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${name}.dir) | |
432 endif(build_binary_tmp AND NOT D_IS_MARS) | |
433 | |
434 if(CMAKE_BUILD_TYPE) | |
435 string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UPPER) | |
436 set(compile_flags_tmp ${compile_flags_tmp} ${D_${CMAKE_BUILD_TYPE_UPPER}_FLAGS}) | |
437 endif(CMAKE_BUILD_TYPE) | |
438 | |
215 | 439 if(detect_deps_tmp) |
440 message(STATUS "Getting dependencies for ${name}") | |
203
d3383b16f1d7
Add a 'NO_DEPS_SOURCES' option to the 'add_d_target' macro. And use it for resources and forms in QtD examples.
SokoL_SD
parents:
181
diff
changeset
|
441 get_files_depends(tmp ${SOURCES_tmp}) |
d3383b16f1d7
Add a 'NO_DEPS_SOURCES' option to the 'add_d_target' macro. And use it for resources and forms in QtD examples.
SokoL_SD
parents:
181
diff
changeset
|
442 set(SOURCES_tmp ${tmp}) |
215 | 443 endif(detect_deps_tmp) |
212 | 444 set(SOURCES_tmp ${SOURCES_tmp} ${NO_DEPS_SOURCES_tmp}) |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
445 |
132 | 446 set(used_ar_tmp) |
447 get_filename_component(output_path_tmp ${output_name_tmp} PATH) | |
448 if (NOT not_obj_tmp) | |
449 compile_d_files(${name} objs_tmp ${SOURCES_tmp} FLAGS ${compile_flags_tmp}) | |
450 set(SOURCES_tmp ${objs_tmp}) | |
451 if(NOT D_IS_MARS AND ${TYPE_tmp} STREQUAL "STATIC") | |
452 set(parameters_tmp rcs ${output_name_tmp} ${SOURCES_tmp} ${OBJECTS_tmp}) | |
453 set(parameters_list_file_tmp ${tmp_dir_tmp}/parameters) | |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
454 if(CMAKE_HOST_WIN32) |
132 | 455 file(REMOVE ${parameters_list_file_tmp}) |
456 foreach(arg_tmp ${parameters_tmp}) | |
457 file(APPEND ${parameters_list_file_tmp} "${arg_tmp}\n") | |
458 endforeach(arg_tmp) | |
459 set(param_tmp @${parameters_list_file_tmp}) | |
460 elseif(CMAKE_HOST_UNIX) | |
461 set(param_tmp ${parameters_tmp}) | |
462 endif(CMAKE_HOST_WIN32) | |
463 add_custom_command( | |
464 OUTPUT "${output_name_tmp}" | |
465 COMMAND "${CMAKE_AR}" | |
466 ARGS ${param_tmp} | |
467 DEPENDS ${SOURCES_tmp} | |
468 COMMENT "Linking ${lib_name}" | |
469 ) | |
470 set(used_ar_tmp 1) | |
471 endif(NOT D_IS_MARS AND ${TYPE_tmp} STREQUAL "STATIC") | |
472 endif (NOT not_obj_tmp) | |
473 | |
474 if (NOT used_ar_tmp) | |
475 set(output_name_native_tmp ${output_name_tmp}) | |
476 if(D_IS_MARS) | |
477 set(additional_commands_tmp ${additional_commands_tmp} COMMAND ${CMAKE_COMMAND} -E make_directory ${output_path_tmp}) | |
478 make_native_path(output_name_native_tmp) | |
479 endif(D_IS_MARS) | |
480 set(parameters_tmp ${compile_flags_tmp} ${link_flags_tmp} ${SOURCES_tmp} ${OBJECTS_tmp} -of${output_name_native_tmp}) | |
481 set(parameters_list_file_tmp ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${name}.dir/parameters) | |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
482 if(CMAKE_HOST_WIN32) |
132 | 483 file(REMOVE ${parameters_list_file_tmp}) |
484 foreach(arg_tmp ${parameters_tmp}) | |
485 file(APPEND ${parameters_list_file_tmp} "${arg_tmp}\n") | |
486 endforeach(arg_tmp) | |
487 set(param_tmp @${parameters_list_file_tmp}) | |
488 elseif(CMAKE_HOST_UNIX) | |
489 set(param_tmp ${parameters_tmp}) | |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
490 endif(CMAKE_HOST_WIN32) |
132 | 491 #get_imported_files(depends_tmp ${SOURCES_tmp}) |
492 add_custom_command( | |
493 OUTPUT ${output_name_tmp} | |
494 ${additional_commands_tmp} | |
495 COMMAND ${DC} | |
496 ARGS ${param_tmp} | |
497 DEPENDS ${SOURCES_tmp} ${depends_tmp} | |
498 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | |
499 COMMENT "Linking ${name}" | |
500 ) | |
501 endif(NOT used_ar_tmp) | |
502 add_custom_target(${name} ALL DEPENDS ${DEPENDS_tmp} ${output_name_tmp}) | |
503 endmacro(add_d_target name) | |
504 | |
505 ## Add static library target. | |
506 macro(add_d_static_lib name) | |
507 add_d_target(${name} TYPE STATIC SOURCES ${ARGN}) | |
508 endmacro(add_d_static_lib name) | |
509 | |
510 ## Add binary target. | |
511 macro(add_d_program name) | |
512 add_d_target(${name} TYPE BINARY SOURCES ${ARGN}) | |
513 endmacro(add_d_program name) | |
514 | |
515 ## Add shared library target. | |
516 macro(add_d_shared_lib name) | |
517 add_d_target(${name} TYPE SHARED SOURCES ${ARGN}) | |
518 endmacro(add_d_shared_lib name) | |
519 | |
520 ## Add library target. | |
237 | 521 ## Library will shared if it supported. |
132 | 522 macro(add_d_lib name) |
523 if(D_IS_MARS) | |
524 add_d_target(${name} TYPE STATIC ${ARGN}) | |
525 else(D_IS_MARS) | |
526 add_d_target(${name} TYPE SHARED ${ARGN}) | |
527 endif(D_IS_MARS) | |
528 endmacro(add_d_lib name) | |
529 | |
245 | 530 ## |
237 | 531 macro(get_imported_files_old imported) |
132 | 532 execute_process(COMMAND ${DC} -c -o- -v ${compile_flags_tmp} ${ARGN} |
533 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | |
534 OUTPUT_VARIABLE dc_output_tmp | |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
535 |
132 | 536 ) |
245 | 537 string(REGEX MATCHALL "import[^(]*([^)]*)" dc_output_tmp "${dc_output_tmp}") |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
538 |
237 | 539 ## Initial filter. |
540 regex_safe_string(tmp ${CMAKE_CURRENT_SOURCE_DIR}) | |
541 regex_safe_string(tmp2 ${CMAKE_CURRENT_BINARY_DIR}) | |
245 | 542 set(regex_includes_tmp "${tmp}|${tmp2}") |
237 | 543 |
132 | 544 set(${imported}) |
545 foreach(import_tmp ${dc_output_tmp}) | |
237 | 546 ## Getting a next import. |
245 | 547 string(REGEX REPLACE "import[^(]*\\(([^)]*)" "\\1" import_tmp ${import_tmp}) |
237 | 548 ## Filtering. |
245 | 549 string(REPLACE "\\" "/" import_tmp ${import_tmp}) |
550 string(REGEX MATCH "(${regex_includes_tmp})" found "${import_tmp}") | |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
551 if(CMAKE_HOST_WIN32) |
245 | 552 string(SUBSTRING "${import_tmp}" 1 2 first_sym_tmp) |
553 set(full_path_tmp) | |
554 if(${first_sym_tmp} STREQUAL ":/") | |
555 set(full_path_tmp 1) | |
556 endif(${first_sym_tmp} STREQUAL ":/") | |
557 elseif(CMAKE_HOST_UNIX) | |
558 string(SUBSTRING "${import_tmp}" 0 1 first_sym_tmp) | |
559 set(full_path_tmp) | |
560 if(${first_sym_tmp} STREQUAL "/") | |
561 set(full_path_tmp 1) | |
562 endif(${first_sym_tmp} STREQUAL "/") | |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
563 endif(CMAKE_HOST_WIN32) |
245 | 564 if(found OR NOT full_path_tmp) |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
565 set(${imported} ${${imported}} ${import_tmp}) |
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
566 endif(found OR NOT full_path_tmp) |
132 | 567 endforeach(import_tmp ${dc_output_tmp}) |
237 | 568 endmacro(get_imported_files_old imported) |
132 | 569 |
570 macro(filter_paths result) | |
571 set(${result}) | |
572 set(read_now_tmp paths) | |
573 set(include_tmp) | |
574 set(paths_tmp) | |
575 foreach(arg_tmp ${ARGN}) | |
576 set(founded_tmp) | |
577 if(${arg_tmp} STREQUAL "INCLUDE_PATHS") | |
578 set(read_now_tmp includes) | |
579 set(founded_tmp 1) | |
580 elseif(${arg_tmp} STREQUAL "INCLUDE_CURRENT_DIR") | |
581 set(locale_tmp 1) | |
582 set(read_now_tmp paths) | |
583 set(founded_tmp 1) | |
584 endif(${arg_tmp} STREQUAL "INCLUDE_PATHS") | |
585 if(NOT founded_tmp) | |
586 set(${read_now_tmp}_tmp ${${read_now_tmp}_tmp} ${arg_tmp}) | |
587 endif(NOT founded_tmp) | |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
588 endforeach(arg_tmp ${ARGN}) |
132 | 589 regex_safe_string(include_tmp ${includes_tmp}) |
590 set(regex_include_tmp) | |
591 set(is_first_tmp 1) | |
592 foreach(include_tmp ${includes_tmp}) | |
593 if(is_first_tmp) | |
594 set(is_first_tmp 1) | |
595 else(is_first_tmp) | |
596 set(regex_includes_tmp ${regex_includes_tmp}|) | |
597 endif(is_first_tmp) | |
598 set(regex_includes_tmp ${regex_includes_tmp}${include_tmp}) | |
599 endforeach(include_tmp ${include_tmp}) | |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
600 foreach(path_tmp ${paths_tmp}) |
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
601 file(TO_CMAKE_PATH path_tmp ${path_tmp}) |
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
602 string(REGEX MATCH "(${regex_includes_tmp})[^/]*" found "${path_tmp}") |
132 | 603 set(full_path_tmp 1) |
604 if(locale_tmp) | |
605 string(SUBSTRING "${path_tmp}" 0 1 first_sym_tmp) | |
606 set(full_path_tmp) | |
607 if(${first_sym_tmp} STREQUAL "/") | |
608 set(full_path_tmp 1) | |
609 endif(${first_sym_tmp} STREQUAL "/") | |
610 endif(locale_tmp) | |
611 if(NOT found AND full_path_tmp) | |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
612 else(NOT found AND full_path_tmp) |
132 | 613 set(${result} ${${result}} ${path_tmp}) |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
614 endif(NOT found AND full_path_tmp) |
132 | 615 endforeach(path_tmp ${paths_tmp}) |
616 endmacro(filter_paths ) | |
617 | |
618 macro(get_files_depends out) | |
275 | 619 set(deps_file_tmp ${CMAKE_CURRENT_BINARY_DIR}/${ARGN}.deps) |
620 set(update_deps_tmp 0) | |
621 foreach(arg_tmp ${ARGN}) | |
622 if(NOT IS_ABSOLUTE arg_tmp) | |
623 set(arg_tmp ${CMAKE_CURRENT_SOURCE_DIR}/${arg_tmp}) | |
624 endif(NOT IS_ABSOLUTE arg_tmp) | |
625 if(${arg_tmp} IS_NEWER_THAN ${deps_file_tmp}) | |
626 set(update_deps_tmp 1) | |
627 break(arg_tmp ${ARGN}) | |
628 endif(${arg_tmp} IS_NEWER_THAN ${deps_file_tmp}) | |
629 endforeach(arg_tmp ${ARGN}) | |
630 if(update_deps_tmp) | |
631 get_imported_files_old(${out} ${ARGN}) | |
632 #filter_paths(${out} ${${out}} INCLUDE_CURRENT_DIR INCLUDE_PATHS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) | |
633 set(${out} ${ARGN} ${${out}}) | |
634 file(WRITE ${deps_file_tmp} "${${out}}") | |
635 else(update_deps_tmp) | |
636 file(STRINGS ${deps_file_tmp} ${out}) | |
637 endif(update_deps_tmp) | |
132 | 638 endmacro(get_files_depends out) |