[cmake-developers] [CMake 0014247]: CxxTest source files are compiled in Visual Studio 10 though they shouldn't

Mantis Bug Tracker mantis at public.kitware.com
Wed Jun 26 10:53:27 EDT 2013


The following issue has been SUBMITTED. 
====================================================================== 
http://cmake.org/Bug/view.php?id=14247 
====================================================================== 
Reported By:                res3d
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14247
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2013-06-26 10:53 EDT
Last Modified:              2013-06-26 10:53 EDT
====================================================================== 
Summary:                    CxxTest source files are compiled in Visual Studio
10 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.
====================================================================== 

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                    
======================================================================




More information about the cmake-developers mailing list