MantisBT - CMake | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0015917 | CMake | CMake | public | 2016-01-13 18:16 | 2016-06-10 14:21 |
| Reporter | Daniel Williams | ||||
| Assigned To | |||||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | closed | Resolution | no change required | ||
| Platform | Win64 | OS | Windows 7 | OS Version | sp1 |
| Product Version | CMake 3.4.1 | ||||
| Target Version | Fixed in Version | ||||
| Summary | 0015917: Visual Studio project files generated incorrectly | ||||
| Description | Executables are incorrectly flagged as Application executables (i.e. to use winMain) instead of utility / console executables (and use the normal main) when cmake is generating solution (.sln) and project (.vcxproj) files for Visual Studio, it cannot set the flags correctly. The generator creates: <ConfigurationType>Application</ConfigurationType> Instead of: <ConfigurationType>Utility</ConfigurationType> This in turn causes compile-time Link Errors As it should. This is controlled by a flag on the executable. (or so says the documentation): [1]https://cmake.org/cmake/help/v3.4/command/add_executable.html [^] [2]https://cmake.org/cmake/help/v3.4/prop_tgt/WIN32_EXECUTABLE.html [^] | ||||
| Steps To Reproduce | 1) create empty project with supplied CMakeLists.txt 2) create a minimal 'main.cpp' (contents don't matter, empty should be fine) 3) run configure ; run generate 4) inspect $BUILD_DIR/test.exe.vcxproj DOM: Project/PropertyGroup/ConfigurationType values will all still be set to "Application" which requires the winmain symbol be defined. This Application tag is generated both with and without the WIN32 flag. It is only supposed to be generated *with*. (Without the flag, the 'ConfigurationType' tag should be set to 'Utility', the console exe version.) | ||||
| Additional Information | 1) Originally Reproduced as far back as CMake 3.1.2 2) the 'set_executable(...)' function correctly sets the flag, as checked by 'get_target_property(...)', but this property does not carry through to the file generation stage. | ||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | https://public.kitware.com/Bug/file/5610/CMakeLists.txt https://public.kitware.com/Bug/file/5612/CMakeLists-15917-ng.txt | ||||
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
| 2016-01-13 18:16 | Daniel Williams | New Issue | |||
| 2016-01-13 18:16 | Daniel Williams | File Added: CMakeLists.txt | |||
| 2016-01-14 03:21 | Nils Gladitz | File Added: CMakeLists-15917-ng.txt | |||
| 2016-01-14 03:22 | Nils Gladitz | Note Added: 0040228 | |||
| 2016-01-14 14:24 | Daniel Williams | Note Added: 0040245 | |||
| 2016-01-14 14:45 | Nils Gladitz | Status | new => resolved | ||
| 2016-01-14 14:45 | Nils Gladitz | Resolution | open => no change required | ||
| 2016-01-14 14:45 | Nils Gladitz | Assigned To | => Nils Gladitz | ||
| 2016-01-14 14:45 | Brad King | Assigned To | Nils Gladitz => | ||
| 2016-06-10 14:21 | Kitware Robot | Note Added: 0041287 | |||
| 2016-06-10 14:21 | Kitware Robot | Status | resolved => closed | ||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||