MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0014702 | CMake | (No Category) | public | 2014-01-16 06:39 | 2014-06-02 08:38 |
Reporter | Mattes D | ||||
Assigned To | |||||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Platform | Windows Any | OS | Windows | OS Version | Any |
Product Version | CMake 2.8.11.2 | ||||
Target Version | Fixed in Version | ||||
Summary | 0014702: PREFIX property is ignored for Visual Studio 2010+ generators | ||||
Description | The Visual Studio 2010+ generator, as implemented in cmVistualStudio10Target.cpp, seems to half-ignore the setting of the PREFIX property. The executable is built without this prefix, although the PDB files do contain the prefix. The Visual Studio 2008 and lower generators do handle the property as expected, which brings even more chaos. | ||||
Steps To Reproduce | We use the following code in our CMakeLists.txt: ``` add_executable(${EXECUTABLE} ${SOURCE}) set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin) set_target_properties(${EXECUTABLE} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin) if (MSVC) # MSVC generator adds a "Debug" or "Release" postfixes to the EXECUTABLE_OUTPUT_PATH, we need to cancel them: SET_TARGET_PROPERTIES(${EXECUTABLE} PROPERTIES PREFIX "../") SET_TARGET_PROPERTIES(${EXECUTABLE} PROPERTIES IMPORT_PREFIX "../") endif() ``` In the MSVC2008 generator the executable correctly generates in the $/bin/ folder; MSVC2010+ generators generate the executable in $/bin/<configuration>/ folder instead. | ||||
Additional Information | The full CMakeLists.txt is available at https://github.com/mc-server/MCServer/blob/d67cd8dafc9d87fc5f26fd40c965e4234ac0f3b1/CMakeLists.txt [^] The project using this file is at GitHub: https://github.com/mc-server/MCServer [^] We actually test on MSVC2013, but this part of the projectfile generation seems to be shared among 2010, 2012 and 2013 in CMake sources. | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2014-01-16 06:39 | Mattes D | New Issue | |||
2014-01-16 09:46 | Brad King | Note Added: 0034952 | |||
2014-01-16 09:46 | Brad King | Status | new => resolved | ||
2014-01-16 09:46 | Brad King | Resolution | open => no change required | ||
2014-06-02 08:38 | Robert Maynard | Note Added: 0036084 | |||
2014-06-02 08:38 | Robert Maynard | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|