[mlpack-svn] [MLPACK] #322: CMake does not copy modified header files to build/include/ on 'make mlpack'
MLPACK Trac
trac at coffeetalk-1.cc.gatech.edu
Tue Feb 4 10:03:53 EST 2014
#322: CMake does not copy modified header files to build/include/ on 'make
mlpack'
--------------------------+-------------------------------------------------
Reporter: rcurtin | Owner: rcurtin
Type: defect | Status: new
Priority: minor | Milestone:
Component: build system | Keywords: cmake, template, header files
Blocking: | Blocked By:
--------------------------+-------------------------------------------------
When one types 'make mlpack', there is a CMake rule to copy all the header
files to build/include/; from src/mlpack/CMakeLists.txt:
{{{
# Move all of these header files to <builddir>/include/mlpack/ after the
library
# is built. First we have to create that directory though.
add_custom_command(TARGET mlpack POST_BUILD
COMMENT "Moving header files to include/mlpack/"
COMMAND ${CMAKE_COMMAND} ARGS -E
make_directory ${CMAKE_BINARY_DIR}/include/mlpack/)
# Then copy each of the header files over to that directory.
foreach(incl_file ${INCLUDE_FILES})
add_custom_command(TARGET mlpack POST_BUILD
COMMAND ${CMAKE_COMMAND} ARGS -E
copy ${CMAKE_CURRENT_SOURCE_DIR}/${incl_file}
${CMAKE_BINARY_DIR}/include/mlpack/${incl_file})
endforeach()
}}}
When I modify some .cpp file, and then type 'make mlpack', this is
executed. However, if I modify a *_impl.hpp file, libmlpack.so does not
need to be recompiled because the _impl.hpp does not actually affect
libmlpack.so because of the fact that templates aren't instantiated until
they are needed (and many templates are not explicitly instantiated in
libmlpack.so).
Ideally, though, when I type 'make mlpack', it should at least copy any
modified header files to build/include/. So we need to make sure that the
bit of CMake code I posted above gets executed regardless of whether or
not the mlpack target (libmlpack.so) is up-to-date.
--
Ticket URL: <http://trac.research.cc.gatech.edu/fastlab/ticket/322>
MLPACK <www.fast-lab.org>
MLPACK is an intuitive, fast, and scalable C++ machine learning library developed at Georgia Tech.
More information about the mlpack-svn
mailing list