[CMake] CMake's Dependency Scanner - Disabling?

Naram Qashat cyberbotx at cyberbotx.com
Tue Dec 30 03:17:03 EST 2008


Bill Hoffman wrote:
> Naram Qashat wrote:
>> Is it possible to disable CMake's implicit dependency scanner?  I 
>> understand that it is probably a helpful feature on many projects, but 
>> on the project I'm working on, I opted to explicitly define the 
>> dependencies instead and would like to save a bit of time during 
>> compiling by not scanning for dependencies.
>>
> 
> No, not really.
> 
> You could try using the include_regular_expression command to set the 
> regex to something that did not match anything.  That should speed 
> things up and almost have the same effect.  CMake would only read direct 
> files.
> 
> However, this seems a risky thing to do, as keeping your depends 
> up-to-date will be difficult.  As long as none of your users complain on 
> the CMake mailing list about things not rebuilding when they should, I 
> guess that is your problem... :)
> 
> -Bill

I tried to do include_regular_expression("^$") from the root CMakeLists.txt but 
that didn't stop the dependency scanner.  I even tried to put it in every 
CMakeLists.txt and same thing.  Then I tried to set the string between ^ and $ 
to something ridiculous that would never match anything in our source tree, but 
it still didn't work.  Now, I'm not sure if it's just displaying the "Scanning 
dependencies for <target>" line regardless of if it's actually doing any 
scanning, but from first glance it seems like it still is doing the scanning. 
So there really is no way to disable the scanner then?

Thanks,
Naram Qashat


More information about the CMake mailing list