Modify CheckCXXLibraryExists to use CMakeFiles directory.
authorAndreas Schuh <andreas.schuh.84@gmail.com>
Mon, 17 Mar 2014 13:25:04 +0000 (13:25 +0000)
committerAndreas Schuh <andreas.schuh.84@gmail.com>
Mon, 17 Mar 2014 13:25:04 +0000 (13:25 +0000)
cmake/CheckCXXLibraryExists.cmake

index eb0885f..0d1747d 100644 (file)
@@ -50,10 +50,10 @@ macro(CHECK_CXX_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE)
         ${CHECK_LIBRARY_EXISTS_LIBRARIES} ${CMAKE_REQUIRED_LIBRARIES})
     endif()
     configure_file(${CMAKE_ROOT}/Modules/CheckFunctionExists.c
-                   ${CMAKE_BINARY_DIR}/CheckFunctionExists.cxx COPYONLY)
+                   ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckFunctionExists.cxx COPYONLY)
     try_compile(${VARIABLE}
       ${CMAKE_BINARY_DIR}
-      ${CMAKE_BINARY_DIR}/CheckFunctionExists.cxx
+      ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckFunctionExists.cxx
       COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
       LINK_LIBRARIES ${CHECK_LIBRARY_EXISTS_LIBRARIES}
       CMAKE_FLAGS