aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2018-12-01 15:28:33 -0500
committerJames McCoy <jamessan@jamessan.com>2018-12-01 15:28:33 -0500
commitbb94895d52bcc58fb23e1010c9e896b7064b7ca0 (patch)
tree2e30c93e463e7d71526df5e255c8cdfcb712b420
parent799d9c32157c841c3b8d355fa98a5ace435eef07 (diff)
downloadrneovim-bb94895d52bcc58fb23e1010c9e896b7064b7ca0.tar.gz
rneovim-bb94895d52bcc58fb23e1010c9e896b7064b7ca0.tar.bz2
rneovim-bb94895d52bcc58fb23e1010c9e896b7064b7ca0.zip
Unset CMAKE_REQUIRED_* after they're done being used
As of CMake 3.12, check_include_files() also link the check executable against the libraries listed in CMAKE_REQUIRED_LIBRARIES. Therefore we should unset the CMAKE_REQUIRED_* variables after each respective use to avoid them unnecessarily bleeding into other checks.
-rw-r--r--CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 26a6529fcd..527ab5eba4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -389,6 +389,7 @@ main(void)
return MSGPACK_OBJECT_FLOAT32;
}
" MSGPACK_HAS_FLOAT32)
+unset(CMAKE_REQUIRED_LIBRARIES)
if(MSGPACK_HAS_FLOAT32)
add_definitions(-DNVIM_MSGPACK_HAS_FLOAT32)
endif()
@@ -410,6 +411,8 @@ if(FEAT_TUI)
return unibi_num_from_var(unibi_var_from_num(0));
}
" UNIBI_HAS_VAR_FROM)
+ unset(CMAKE_REQUIRED_INCLUDES)
+ unset(CMAKE_REQUIRED_LIBRARIES)
if(UNIBI_HAS_VAR_FROM)
add_definitions(-DNVIM_UNIBI_HAS_VAR_FROM)
endif()