<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Unconditionally rebuild</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97507/unconditionally-rebuild</link><description>Hi, One of my source files contain the macros __DATE__ and __TIME__ to keep track of the build date/time of my project. This source file needs always to be rebuild unconditionally. Is there a way this can be done with the Nordic SDK 
 Thanks for you help</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 14 Mar 2023 12:38:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97507/unconditionally-rebuild" /><item><title>RE: Unconditionally rebuild</title><link>https://devzone.nordicsemi.com/thread/415202?ContentTypeID=1</link><pubDate>Tue, 14 Mar 2023 12:38:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:229c755d-b042-470a-b1db-0c62a1a7b9b7</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Bert,&lt;/p&gt;
&lt;p&gt;Good to know. It&amp;#39;s my pleasure to help.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unconditionally rebuild</title><link>https://devzone.nordicsemi.com/thread/415186?ContentTypeID=1</link><pubDate>Tue, 14 Mar 2023 12:27:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28b44c23-49d4-4a00-a53b-3f62b76f42bc</guid><dc:creator>Bert Baselmans</dc:creator><description>&lt;p&gt;Hi Hieu,&lt;/p&gt;
&lt;p&gt;That was exactly what I meant.&lt;br /&gt;Thank you very much&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Bert&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unconditionally rebuild</title><link>https://devzone.nordicsemi.com/thread/415141?ContentTypeID=1</link><pubDate>Tue, 14 Mar 2023 11:16:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9cdf9a68-b794-41d1-8b36-f10ec609b62a</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Bert,&lt;/p&gt;
&lt;p&gt;There are no samples, unfortunately. However, I was able to get the main.c file in the Hello World sample to be rebuilt every time&amp;nbsp;by adding the following lines to the project&amp;#39;s CMakeList.txt.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;add_custom_command(TARGET app
        PRE_BUILD
        COMMAND ${CMAKE_COMMAND} -E touch_nocreate ${CMAKE_CURRENT_SOURCE_DIR}/src/main.c) &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unconditionally rebuild</title><link>https://devzone.nordicsemi.com/thread/415056?ContentTypeID=1</link><pubDate>Tue, 14 Mar 2023 07:31:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5094f64-2511-4b3c-a7a0-f81e02d6d3f6</guid><dc:creator>Bert Baselmans</dc:creator><description>&lt;p&gt;Hi Hieu,&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;CMake is relative new to me so I can&amp;#39;t get this solution working. Is there maybe an example available that can help me?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Bert&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unconditionally rebuild</title><link>https://devzone.nordicsemi.com/thread/414456?ContentTypeID=1</link><pubDate>Thu, 09 Mar 2023 16:07:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:560b4606-16dc-4b2b-a5ed-b51731b8ee41</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Bert,&lt;/p&gt;
&lt;p&gt;You could do that by updating the project&amp;#39;s CMakeList.txt file. Here is one Stack Overflow&amp;nbsp;thread on that topic. Could you check it out and see if any options they provide there works for you?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://stackoverflow.com/questions/61203555/can-cmake-always-force-the-compilation-build-of-a-specific-file"&gt;Can CMake always force the compilation/build of a specific file? - Stack Overflow&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>