View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0001258 | CMake | public | 2004-10-15 18:20 | 2005-02-10 08:03 | |||||
Reporter | kireputsje | ||||||||
Assigned To | Bill Hoffman | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0001258: Compiler flags are not correctly handled for vs.net | ||||||||
Description | The vs.net generator handles only the -D flags correctly. Other flags will cause strange errors. The URL points to start of the thread about this problem. Errors: \dev\cmake\test.cpp(2) : error C2124: divide or mod by zero \dev\cmake\test.cpp(2) : warning C4067: unexpected tokens following preprocessor directive - expected a newline \dev\cmake\test.cpp(2) : warning C4067: unexpected tokens following preprocessor directive - expected a newline Test program: -------- CMakeLists.txt -------- PROJECT( test ) ADD_DEFINITIONS( -DSOME_DEFINE=1 ) ADD_DEFINITIONS( /Yu"test.h" ) ADD_EXECUTABLE( test test.cpp ) -------- end -------- -------- test.cpp -------- int main(void) { #if SOME_DEFINE return 0; #else return 1; #endif } -------- end -------- | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0001617) kireputsje (reporter) 2004-10-15 18:31 |
Some more text from the original mail: When compiling a project which always seemed to work under VC6, We ran into a problem when using VS.NET 2003. I tracked this down to the following define: #if SOME_DEFINE Which is expanded to something like: #if 1/Yu"test.h" When examining the test.vcproj.cmake, I noticed: SOME_DEFINE=1 /Yu"test.h", Seems like ADD_DEFINITIONS only allows -D options? |
(0002050) Bill Hoffman (manager) 2005-02-10 08:03 |
fixed in cvs |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |