Hi David,
thank you for the fast feedback. Do you have an example where a native path
does not work as path here? As the current solution is not correct (a more
specific example is following), I am still absolutely convinced that it must be
fixed somehow. If you would categorize the fix as an API-breaking change, what
are the options? - A new CMake policy?
Example excerpt (it is not possible to change the working directory for the
CONFIGURE_COMMAND as it is fixed to the BUILD_DIR, which might not be
sufficient):
set(bootstrap_cmd "<SOURCE_DIR>/bootstrap${shell_ext}" ${bootstrap_toolset})
if(WIN32)
set(bootstrap_cmd pushd "<SOURCE_DIR>" COMMAND ${bootstrap_cmd} COMMAND popd)
endif()
ExternalProject_Add(Boost
...
CONFIGURE_COMMAND ${bootstrap_cmd}
...
)
One would need to write workarounds to get this working currently, for example,
set CONFIGURE_COMMAND to "" and add a custom step which allows for a user
specified WORKING_DIRECTORY or rewrite the directory token replacement locally.
But both workarounds would only resolve the symptoms, not the actual problem
that might occur in another example.
Best regards,
Stefan
________________________________________
Von: David Cole [[email protected]]
Gesendet: Donnerstag, 20. August 2015 05:27
An: Kislinskiy, Stefan
Cc: [email protected]
Betreff: Re: [cmake-developers] ExternalProject: Use native paths as substitute
for directory tokens
But some existing replacements require forward slashes, we can't just "to
native path" everything blindly. I think you will have to special case the bits
which do need native paths.
On Wednesday, August 19, 2015, Kislinskiy, Stefan
<[email protected]<mailto:[email protected]>> wrote:
Hi,
I would like to contribute a fix regarding directory tokens (e.g. <SOURCE_DIR>)
in the ExternalProject module. These tokens are replaced by their matching
target property value _EP_${dir}. However, the path substitutes are not
converted to native path style which makes it impossible to use directory
tokens in some Windows commands like pushd, as these commands are not able to
handle forward slashes. I attached a tiny patch which simply calls
file(TO_NATIVE_PATH) before replacing directory tokens.
Best regards,
Stefan Kislinskiy
--
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-developers