diff options
author | David Cole <david.cole@kitware.com> | 2012-01-17 21:25:38 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2012-01-17 21:25:38 (GMT) |
commit | a6518c30e0ae0de17cd89dd52158501fc92d4455 (patch) | |
tree | e7c7d10b43b317767e7fb25d7c275108f7d2484e /Modules | |
parent | 05fbfd494eb3fb343e316808d390b22d8b71c7a0 (diff) | |
parent | 6856b4d19d85a9f72354744b5118e2946a90da45 (diff) | |
download | CMake-a6518c30e0ae0de17cd89dd52158501fc92d4455.zip CMake-a6518c30e0ae0de17cd89dd52158501fc92d4455.tar.gz CMake-a6518c30e0ae0de17cd89dd52158501fc92d4455.tar.bz2 |
Merge topic 'check_symbol_exists'
6856b4d Merge topic 'link-shared-depend-cycle-issue-12647' into check_symbol_exists
8e1f376 add a test for Check{,CXX}SymbolExists
813eca6 CheckSymbolExists: force the compiler to keep the referenced symbol
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CheckSymbolExists.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CheckSymbolExists.cmake b/Modules/CheckSymbolExists.cmake index 183b2bb..515319d 100644 --- a/Modules/CheckSymbolExists.cmake +++ b/Modules/CheckSymbolExists.cmake @@ -60,7 +60,7 @@ MACRO(_CHECK_SYMBOL_EXISTS SOURCEFILE SYMBOL FILES VARIABLE) "${CMAKE_CONFIGURABLE_FILE_CONTENT}#include <${FILE}>\n") ENDFOREACH(FILE) SET(CMAKE_CONFIGURABLE_FILE_CONTENT - "${CMAKE_CONFIGURABLE_FILE_CONTENT}\nvoid cmakeRequireSymbol(int dummy,...){(void)dummy;}\nint main()\n{\n#ifndef ${SYMBOL}\n cmakeRequireSymbol(0,&${SYMBOL});\n#endif\n return 0;\n}\n") + "${CMAKE_CONFIGURABLE_FILE_CONTENT}\nint main(int argc, char** argv)\n{\n (void)argv;\n#ifndef ${SYMBOL}\n return ((int*)(&${SYMBOL}))[argc];\n#else\n (void)argc;\n return 0;\n#endif\n}\n") CONFIGURE_FILE("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in" "${SOURCEFILE}" @ONLY IMMEDIATE) |