[CMake] Depending on a Config File (CMake and VC++)
Brad King
brad.king at kitware.com
Fri May 26 16:50:47 EDT 2006
Steve Johns wrote:
> ELSE(CMAKE_CONFIGURATION_TYPES)
> # Handle single-configuration generators.
> CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/traps_config.txt
> ${CMAKE_CURRENT_BINARY_DIR}/traps_config.txt COPYONLY)
> ENDIF(CMAKE_CONFIGURATION_TYPES)
>> Be careful with this. For an in-source build this may not work. That
>> is why my original example included a ".in" extension on the input file.
>
> I don't really understand that part but I did try this, as an experiment
If the build directory and source directory are the same then this may
try to copy the file onto itself. I think CMake may just not copy it
but I'm not sure what would happen with the dependency when the file
changed since it is never newer than itself.
-Brad
More information about the CMake
mailing list