The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=12945
======================================================================
Reported By: Alessio
Assigned To:
======================================================================
Project: CMake
Issue ID: 12945
Category: CMake
Reproducibility: always
Severity: feature
Priority: high
Status: new
======================================================================
Date Submitted: 2012-02-08 06:40 EST
Last Modified: 2012-02-08 06:40 EST
======================================================================
Summary: CMake should support custom commands that can vary
by configuration
Description:
I think I have a use-case for the feature requested in issue 9974.
Boost DLLs/SOs need to be copied in place to run tests. The have config-specific
filenames, so the only way I can see to make it work is to copy all of them for
all configs, which is not ideal. Boost_SHARED_LIBRARIES_RELEASE and
Boost_SHARED_LIBRARIES_DEBUG below are constructed from the variables provided
by the FindBoost module.
foreach(file ${Boost_SHARED_LIBRARIES_RELEASE} ${Boost_SHARED_LIBRARIES_DEBUG})
mb_message(STATUS "copying ${file} to binary dir")
add_custom_command(
TARGET SETUP_TESTS PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${file}
$<TARGET_FILE_DIR:${mod_name}>)
endforeach()
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2012-02-08 06:40 Alessio New Issue
======================================================================
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers