Am 29.12.2010 19:22 schrieb Michael Jackson:
> You want to do something like this:
> 
> # In the CMake file get the parent directory of the current
> # cmake file that is being parsed
> get_filename_component( CURRENT_DIR ${CMAKE_CURRENT_LIST_FILE} ABSOLUTE)
> 
> configure_file ( ${CURRENT_DIR}/SomeFile.h.in  ...... )
> 
> Is that what you were looking for? 

The problem is that I am not in a list file, but in a module. Hence,
CMAKE_CURRENT_LIST_FILE does not work.

For example I got a module that test some features using a cpp file that
needs to be try-compiled and I now need a way to locate this cpp-file.
All default cmake modules use something like CMAKE_ROOT, but I cannot
assume this.

Regards,
Johannes

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to