[CMake] Depending on a Config File (CMake and VC++)
David Cole
david.cole at kitware.com
Fri May 26 17:22:42 EDT 2006
This is the point where we say: just don't do in-source builds... :-)
Use separate directories for source and binary trees.
2 cents,
David
Brad King wrote:
> 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
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
More information about the CMake
mailing list