View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0014247 | CMake | CMake | public | 2013-06-26 10:53 | 2016-06-10 14:31 | ||||
Reporter | res3d | ||||||||
Assigned To | Philip Lowman | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | moved | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake 2.8.11.1 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0014247: FindCxxTest: CXXTEST_ADD_TEST compiles source files in Visual Studio 10 even though they shouldn't | ||||||||
Description | The source files containing the actual test sources (i.e. the input files to test generantion) are compiled as though there were actual source files in Visual Studio 10 if they have a .cpp extension. But since they can't be compiled standalone it would be desireable to have them only show up in the project, but be excluded from actual compilation. This can be done by tagging the test source files as "header files only" (see attached patch). | ||||||||
Steps To Reproduce | 1. Create a CxxTest with the input files having an .cpp extension: CXXTEST_ADD_TEST(test_UnicodeStream test_generated.cpp my_test_input.cpp) 2. Generate a Visual Studio 10 project. 3. Compile: my_test_input.cpp is being compiled, which fails. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | ![]() | ||||||||
Relationships | |
Relationships |
Notes | |
(0033483) Igor Semenov (reporter) 2013-07-04 07:50 |
Same bug in GCC 4.7.2 on Debian. If tests are in cpp-file, they are built and linked together with generated file, and it causes multiple definitions. Patch, proposed by res3d, doesn't work for me, it removes multiple definitions, but causes multiple undefined references. The only solution for now is to rename tests file from .cpp to .h. |
(0042304) Kitware Robot (administrator) 2016-06-10 14:29 |
Resolving issue as `moved`. This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2013-06-26 10:53 | res3d | New Issue | |
2013-06-26 10:53 | res3d | File Added: cmake-cxxtest-sources-headers-only.patch | |
2013-06-26 11:15 | Brad King | Assigned To | => Philip Lowman |
2013-06-26 11:15 | Brad King | Status | new => assigned |
2013-06-26 11:16 | Brad King | Summary | CxxTest source files are compiled in Visual Studio 10 though they shouldn't => FindCxxTest: CXXTEST_ADD_TEST compiles source files in Visual Studio 10 even though they shouldn't |
2013-07-04 07:50 | Igor Semenov | Note Added: 0033483 | |
2016-06-10 14:29 | Kitware Robot | Note Added: 0042304 | |
2016-06-10 14:29 | Kitware Robot | Status | assigned => resolved |
2016-06-10 14:29 | Kitware Robot | Resolution | open => moved |
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |