summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAcer Yang <acer.yang@prophetstor.com>2014-09-20 15:25:53 +0800
committerNick Mathewson <nickm@torproject.org>2014-11-30 10:19:35 -0500
commitbefbd130719eac4b26989ac9869512bedaf61adb (patch)
tree9f63348b01767039d0530d8b160b3695e9785883
parent5ebad45e2d60e48ba9c2b1127bd0dd06031f955a (diff)
downloadlibevent-befbd130719eac4b26989ac9869512bedaf61adb.tar.gz
Fix cmake error when the Module path has more than one entry.
CMAKE_MODULE_PATH is usually a list instead of single entry. Especially for projects contain sub cmake projects. My patch replace the CMAKE_MODULE_PATH with fixed path, to locate the `.in` file.
-rw-r--r--cmake/CheckPrototypeDefinition.cmake3
1 files changed, 1 insertions, 2 deletions
diff --git a/cmake/CheckPrototypeDefinition.cmake b/cmake/CheckPrototypeDefinition.cmake
index 5e6ba4bb..e0c6a572 100644
--- a/cmake/CheckPrototypeDefinition.cmake
+++ b/cmake/CheckPrototypeDefinition.cmake
@@ -52,8 +52,7 @@ function(CHECK_PROTOTYPE_DEFINITION _FUNCTION _PROTOTYPE _RETURN _HEADER _VARIAB
set(CHECK_PROTOTYPE_DEFINITION_PROTO ${_PROTOTYPE})
set(CHECK_PROTOTYPE_DEFINITION_RETURN ${_RETURN})
- # TODO: Fix this. If the Module path has more than one entry, the below will fail.
- configure_file("${CMAKE_MODULE_PATH}/CheckPrototypeDefinition.c.in"
+ configure_file("${PROJECT_SOURCE_DIR}/cmake/CheckPrototypeDefinition.c.in"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c" @ONLY)
file(READ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c _SOURCE)