MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0008291 | CMake | CMake | public | 2008-12-13 17:23 | 2016-06-10 14:30 |
Reporter | tron_thomas | ||||
Assigned To | Philip Lowman | ||||
Priority | high | Severity | minor | Reproducibility | always |
Status | closed | Resolution | moved | ||
Platform | OS | OS Version | |||
Product Version | CMake-2-6 | ||||
Target Version | Fixed in Version | ||||
Summary | 0008291: CMake won't configure CxxTest dependencies correctly for Xcode | ||||
Description | I am using CxxTest for unit testing in a project that is configured with CMake. Here is an example of a macro used to define a unit test application in the project: macro(AddCxxTest Name) set(TestRunnerDirectory ${BuildPath}/${Name}Source) set(TestRunner ${TestRunnerDirectory}/${Name}.cpp) set(TestRunnerCommand ${EXECUTABLE_OUTPUT_PATH}/${Name}) add_custom_command(OUTPUT ${TestRunner} COMMAND ${CMAKE_COMMAND} -E make_directory ${TestRunnerDirectory} COMMAND ${PERL_EXECUTABLE} ${CxxTestGen} ${CxxTestGenFlags} -o ${TestRunner} ${ARGN} DEPENDS ${ARGN} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) add_executable(${Name} ${TestRunner} ${ARGN}) set_target_properties(${Name} PROPERTIES COMPILE_FLAGS "-I${CxxTestDirectory}") add_test(${Name} ${TestRunnerCommand}) add_dependencies(TestAll ${Name}) endmacro(AddCxxTest) A test is often created like this: file(GLOB Tests RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} Tests/*.h) AddCxxTest(SomeUnitTest ${Tests}) CMake will then successfully create the SomeUnitTest target for the project. With make files on Linux, and Visual Studio on Windows everything works fine. When changes to the header files located in the Tests directory that are used to define the tests for the unit test are made, the SomeUnitTest target will rebuild when building everything. However, with Xcode on Mac OS X, no dependency changes will be detected and the SomeUnitTest target will not rebuild. It has to be cleaned before a build all will pick up the header file changes for the target. CMake should be able to configure the project such that header file changes for the target should result in the executable being rebuilt on Xcode. | ||||
Steps To Reproduce | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2008-12-13 17:23 | tron_thomas | New Issue | |||
2008-12-14 10:20 | Bill Hoffman | Status | new => assigned | ||
2008-12-14 10:20 | Bill Hoffman | Assigned To | => David Cole | ||
2010-08-29 01:34 | Kovarththanan Rajaratnam | Category | CCMake => CMake | ||
2010-09-09 17:52 | David Cole | Priority | normal => high | ||
2010-11-10 21:09 | David Cole | Target Version | => CMake 2.8.4 | ||
2011-01-04 13:05 | David Cole | Note Added: 0024399 | |||
2011-01-04 13:05 | David Cole | Target Version | CMake 2.8.4 => | ||
2012-08-13 15:06 | David Cole | Status | assigned => new | ||
2012-08-13 15:06 | David Cole | Note Added: 0030585 | |||
2012-08-13 15:07 | David Cole | Status | new => backlog | ||
2012-08-13 15:23 | David Cole | Assigned To | David Cole => | ||
2012-08-18 15:34 | Philip Lowman | Assigned To | => Philip Lowman | ||
2012-08-18 15:34 | Philip Lowman | Status | backlog => assigned | ||
2016-06-10 14:27 | Kitware Robot | Note Added: 0041483 | |||
2016-06-10 14:27 | Kitware Robot | Status | assigned => resolved | ||
2016-06-10 14:27 | Kitware Robot | Resolution | open => moved | ||
2016-06-10 14:30 | Kitware Robot | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|