CMake itself does this to include a file at ctest time that applies to
*all* tests:

  set_directory_properties(PROPERTIES
    TEST_INCLUDE_FILE
    "${CMake_BINARY_DIR}/Tests/EnforceConfig.cmake")

It results in this line being generated in CTestTestfile.cmake at the
very top of the file:

   include("C:/n/d/Nightly/cmake
Win32-ninja-cl11-Debug/Tests/EnforceConfig.cmake")

If you wrote/configured a file that had this in it (can be in your
build tree, as CMake's is...):

  set(ENV{PATH} "/actual/value/of/XXXX_BINDIR:$ENV{PATH}")

...and then set that file as your TEST_INCLUDE_FILE, it should do what
you want in this case.

The documentation is sparse, but there:

  http://www.cmake.org/cmake/help/v3.0/prop_dir/TEST_INCLUDE_FILE.html


HTH,
David C.

-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to