diff options
author | John Szakmeister <john@szakmeister.net> | 2014-03-03 17:52:42 -0500 |
---|---|---|
committer | John Szakmeister <john@szakmeister.net> | 2014-03-07 06:27:41 -0500 |
commit | 477031c03b2c525b117fae8a9b61c98245a06908 (patch) | |
tree | 03bb99fb7dd15ac261a56651479bdca40955f577 | |
parent | a86da86d9822e16ffe0e9da7fe21864cd869ddf8 (diff) | |
download | rneovim-477031c03b2c525b117fae8a9b61c98245a06908.tar.gz rneovim-477031c03b2c525b117fae8a9b61c98245a06908.tar.bz2 rneovim-477031c03b2c525b117fae8a9b61c98245a06908.zip |
Use check_function_exists() to check for _NSGetEnviron().
This avoids a compiler generated warning which result in failing to find
the function with -Werror active. You could argue this is a bug in
CMake: http://public.kitware.com/Bug/view.php?id=13208
-rw-r--r-- | config/CMakeLists.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/config/CMakeLists.txt b/config/CMakeLists.txt index a21d2d75c4..77edd62882 100644 --- a/config/CMakeLists.txt +++ b/config/CMakeLists.txt @@ -1,6 +1,6 @@ include(CheckTypeSize) include(CheckIncludeFiles) -include(CheckSymbolExists) +include(CheckFunctionExists) check_type_size("int" SIZEOF_INT) check_type_size("long" SIZEOF_LONG) @@ -8,7 +8,11 @@ check_type_size("time_t" SIZEOF_TIME_T) check_type_size("off_t" SIZEOF_OFF_T) check_include_files(crt_externs.h HAVE_CRT_EXTERNS_H) -check_symbol_exists(_NSGetEnviron "crt_externs.h" HAVE__NSGETENVIRON) + +if (HAVE_CRT_EXTERNS_H) + set(CMAKE_REQUIRED_INCLUDES crt_externs.h) +endif() +check_function_exists(_NSGetEnviron HAVE__NSGETENVIRON) # generate configuration header and update include directories configure_file ( |