Eduard Bloch wrote: > Hello, > > I need to add a certain variable and a set of strings in a set of > applications, beeing in different paths. This is required because a > static library is compiled with different settings, therefore the set of > additional libraries varies. > > To avoid code duplication and adding the test multiple times, I stored > the code in a .cmake file included into various CMakeLists.txt. The code > works almost as expected, however: I wish to run a test program to > detect a system feature. I need to refer to this test code file in the > included file with the full path (because of Out-of-tree build mode). > But I cannot get this path (directory of the included file) inside of > the included .cmake file itself. ${CMAKE_CURRENT_SOURCE_DIR}/ gives me > the path of the including CMakeLists.txt and not what I need.
CMAKE_CURRENT_LIST_FILE -Brad _______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake