[CMake] cmake side effects: possible bug
Michael Bell
michael.bell at acm.org
Wed Aug 23 15:28:40 EDT 2006
All,
I am running cmake 2.4.3 on solaris.
In many of my subdirectories, I have commands to copy files to a
release directory and make some of them executable:
ADD_CUSTOM_TARGET(makeExecutable ALL)
FOREACH(file ${SCRIPTS})
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}
${EXECUTABLE_OUTPUT_PATH}/../${file}
@ONLY)
ADD_CUSTOM_COMMAND(
TARGET makeExecutable
POST_BUILD
COMMAND chmod
ARGS +x ${EXECUTABLE_OUTPUT_PATH}/../${file}
)
ENDFOREACH(file)
This worked for me in version 1.8, stopped working, and was re-added
in 2.4.3. However, with the current version there is a problem when I
run make in a subdirectory. It seems that even though I am in a
subdirectory, files from every directory get moved. Only those files
from the current subdirectory become executable. In other words, the
CONFIGURE_FILE command gets called when it shouldn't be. I think if I
run make from a subdirectory, other directories should not be
affected. This was the behavior in version 1.8.
thanks,
michael
--
michael.bell at acm.org
More information about the CMake
mailing list