<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi,<br>
<br>
I wanted to factor out some initial stuff of my <font face="Courier
New, Courier, monospace">CMakeLists.txt</font> that I
systematically include.<br>
<br>
typically I include the following lines at the beginning of all my
CMakeLists.txt:<br>
<br>
<font face="Courier New, Courier, monospace">cmake_minimum_required(VERSION
2.8)<br>
function (AA)<br>
message ("calling AA")<br>
endfunction()<br>
<br>
AA()<br>
</font><br>
Then I thought by using the -C option as follows:<br>
<br>
<font face="Courier New, Courier, monospace">> cmake --build=. -C
%CMTROOT%\Init.cmake ..\CMakeLists.txt</font><br>
<br>
with Init.cmake file containing<br>
<br>
<font face="Courier New, Courier, monospace">function(AA)<br>
message("calling aaaa")<br>
endfunction()<br>
</font><br>
This would be equivalent.<br>
<br>
Apparently this is not the case. In particular, the function
definitions are not transmitted by this mechanism<br>
<br>
<font face="Courier New, Courier, monospace">loading initial cache
file ...\Init.cmake<br>
</font><br>
... the functions defined in <font face="Courier New, Courier,
monospace">Init.cmake </font>are not recognized<br>
<br>
Of course I could 'manually' include my module in all CMakeLists.txt
but ...<br>
<br>
Can someone explain why?<br>
<br>
Or, how could I obtain what I need?<br>
<br>
<br>
<br>
Thanks for any hint<br>
<br>
Regards<br>
Christian<br>
<br>
<pre class="moz-signature" cols="72">--
--------------------------------------------
| Christian Arnault |
| LAL Bat 200 pièce 03a |
| 91405 Orsay CEDEX |
| phone : (33) 1 64 46 84 24 |
| gsm : (33) 6 77 27 62 30 |
| fax : (33) 1 69 07 94 04 |
| e-mail : <a class="moz-txt-link-abbreviated" href="mailto:christian.arnault@lal.in2p3.fr">christian.arnault@lal.in2p3.fr</a> |
--------------------------------------------
</pre>
</body>
</html>