On 07/02/2015 05:06 PM, Clifford Yapp wrote:
> When running the BRL-CAD configure process with the latest CMake
> release candidate, the first configure pass completes successfully.
> The second pass fails almost immediately with the error:
>
> CMake Error at CMakeLists.txt:120 (configure_file):
> Unknown CMake command "configure_file".
Thanks for testing the RC! I cannot reproduce that, but BRL-CAD
is a huge project with many configuration options. What exact version
did you build, on what platform, and with what cmake command line?
I see the top-level CMakeLists.txt file in BRL-CAD is using
undocumented and unsupported behavior by re-defining many core
commands as functions, including configure_file:
> function(add_library name)
> _add_library(${name} ${ARGN})
...
> function(add_executable name)
> _add_executable(${name} ${ARGN})
...
> function(add_custom_target name)
> _add_custom_target(${name} ${ARGN})
...
> function(configure_file file targetfile)
> _configure_file(${file} ${targetfile} ${ARGN})
...
> function(add_subdirectory name)
> _add_subdirectory(${name} ${ARGN})
...
> function(message)
> _message(${ARGN})
The ability to do that is meant only for local debugging and is
not documented. I see comments justifying it with a link to old
discussion here:
http://www.cmake.org/pipermail/cmake/2010-September/039388.html
but unfortunately that advice was wrong. BRL-CAD should be using
its own names for those. Or, someone could come to the cmake
developers list to discuss how to add functionality to CMake to
overcome the need for such wrapper functions.
Still, if we can easily fix 3.3 to not regress existing BRL-CAD
releases then we should do so. Can you use the above information
to strip it down to a minimal example showing the problem?
Thanks,
-Brad
--
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