View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0011991 | CMake | CMake | public | 2011-03-21 10:55 | 2013-01-09 10:57 | ||||
Reporter | Daniel Franke | ||||||||
Assigned To | David Cole | ||||||||
Priority | normal | Severity | crash | Reproducibility | always | ||||
Status | closed | Resolution | no change required | ||||||
Platform | Windows | OS | XP | OS Version | |||||
Product Version | CMake-2-8 | ||||||||
Target Version | Fixed in Version | CMake 2.8.10 | |||||||
Summary | 0011991: stack smash with (assumed) case-sensitive file names | ||||||||
Description | FindFLEX.cmake was not available in cmake-2.6 but was added in cmake.2.8. In order to allow find_package() for either version, I created FindFlex.cmake (note the lowercase part of FLEX) in my CMAKE_MODULE_PATH. This file contains: if (${CMAKE_VERSION} VERSION_LESS 2.8) set (FLEX_FOUND "false") else () find_package (FLEX) endif () This works for Linux, but on windows, cmake dies with ERRORLEVEL=-1073741819, i.e. 0xC0000005 which indicates a crash. Taking into account that the file system is not case sensitive, I assume that find_package(Flex) and find_package(FLEX) are not distinguished and thus result in a infinite loop of above script. The problem was seen with cmake 2.8.2. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0025840) Michael Wild (reporter) 2011-03-21 11:10 |
Your implementation has several problems: - doesn't work on case-insensitive file systems (e.g. Mac or Windows, as you noticed) - doesn't forward additional arguments to find_package properly, such as version numbers or REQUIRED. Instead, let CMake work its magic: # ------------------------------------------ set(CMAKE_MODULE_PATH "${CMAKE_ROOT}/Modules" "${CMAKE_SOURCE_DIR}/cmake" # or wherever your CMake modules are ) find_package(FLEX) # ------------------------------------------ If you give them the same name (including the same case), things should work fine automatically. If CMake is new enough, it will first find the version shipped with it, otherwise it will fall back to your custom version. |
(0030217) David Cole (manager) 2012-08-11 10:48 |
Please follow suggestions made by Michael Wild in his note. Let us know if you still have problems after that. |
(0032042) Robert Maynard (manager) 2013-01-09 10:57 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2011-03-21 10:55 | Daniel Franke | New Issue | |
2011-03-21 11:10 | Michael Wild | Note Added: 0025840 | |
2012-08-11 10:47 | David Cole | Assigned To | => David Cole |
2012-08-11 10:47 | David Cole | Status | new => assigned |
2012-08-11 10:48 | David Cole | Note Added: 0030217 | |
2012-08-11 10:48 | David Cole | Status | assigned => resolved |
2012-08-11 10:48 | David Cole | Fixed in Version | => CMake 2.8.10 |
2012-08-11 10:48 | David Cole | Resolution | open => no change required |
2013-01-09 10:57 | Robert Maynard | Note Added: 0032042 | |
2013-01-09 10:57 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |