View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0015772 | CMake | CMake | public | 2015-10-07 09:10 | 2016-03-07 09:12 | ||||
Reporter | Garcia Sylvain | ||||||||
Assigned To | |||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | duplicate | ||||||
Platform | PC | OS | Windows7 | OS Version | |||||
Product Version | CMake 3.3.2 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0015772: snprintf on msvc14 compiler | ||||||||
Description | The CheckFunctionExits module does not detect the new msvc14's snprintf function. | ||||||||
Steps To Reproduce | Run 'cmake -G"Visual Studio 14 2015" .' on the attached CMakeLists.txt | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | CMakeLists.txt [^] (353 bytes) 2015-10-07 09:10 [Show Content] | ||||||||
Relationships | ||||||
|
Relationships |
Notes | |
(0039526) Nils Gladitz (developer) 2015-10-07 09:22 |
CheckFunctionExists checks if the symbol exists at link time. I think vs2015 defines snprinf inline and hence does not export any such symbol to be found at link time. Try using CheckSymbolExists instead. |
(0039527) Garcia Sylvain (reporter) 2015-10-07 09:52 |
Ty for answer, neverthless CheckSymbolExists does not work. I have just been able to detect it using CheckSharedFunctionExists: CHECK_SHARED_FUNCTION_EXISTS(snprintf "stdio.h" kernel32 "" HAVE_SNPRINTF) with the module CheckSharedFunctionExists from https://github.com/matpow2/openal-soft-chowdren/blob/master/cmake/CheckSharedFunctionExists.cmake [^] |
(0039528) Nils Gladitz (developer) 2015-10-07 10:05 |
CheckSymbolExists works for me: -------------------------------------- cmake_minimum_required(VERSION 3.3) include(CheckSymbolExists) check_symbol_exists(snprintf stdio.h HAVE_SNPRINTF) message("[${HAVE_SNPRINTF}]") message("[${CMAKE_CXX_COMPILER_VERSION}]") -------------------------------------- ... [1] [19.0.23026.0] ... -------------------------------------- Maybe you still had results cached from a previous run? |
(0039529) Garcia Sylvain (reporter) 2015-10-07 10:10 |
Ok, my bad. It works ! Thank you and sorry for disruption. |
(0040604) Robert Maynard (manager) 2016-03-07 09:12 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2015-10-07 09:10 | Garcia Sylvain | New Issue | |
2015-10-07 09:10 | Garcia Sylvain | File Added: CMakeLists.txt | |
2015-10-07 09:22 | Nils Gladitz | Note Added: 0039526 | |
2015-10-07 09:52 | Garcia Sylvain | Note Added: 0039527 | |
2015-10-07 10:05 | Nils Gladitz | Note Added: 0039528 | |
2015-10-07 10:10 | Garcia Sylvain | Note Added: 0039529 | |
2015-10-07 11:02 | Gregor Jasny | Relationship added | duplicate of 0015659 |
2015-10-07 11:03 | Gregor Jasny | Status | new => resolved |
2015-10-07 11:03 | Gregor Jasny | Resolution | open => duplicate |
2015-10-07 11:03 | Gregor Jasny | Assigned To | => Gregor Jasny |
2015-10-07 11:03 | Gregor Jasny | Assigned To | Gregor Jasny => |
2016-03-07 09:12 | Robert Maynard | Note Added: 0040604 | |
2016-03-07 09:12 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |