httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jchamp...@apache.org
Subject svn commit: r1752331 - /httpd/httpd/trunk/CMakeLists.txt
Date Tue, 12 Jul 2016 19:13:34 GMT
Author: jchampion
Date: Tue Jul 12 19:13:34 2016
New Revision: 1752331

URL: http://svn.apache.org/viewvc?rev=1752331&view=rev
Log:
CMake: use CMAKE_REQUIRED_INCLUDES to find APR macros

When using CMake with Visual Studio on Windows, invoking the
CHECK_SYMBOL_EXISTS macro with the full paths to the include files seems
to always result in failure.

Instead, use the documented CMAKE_REQUIRED_INCLUDES variable to set the
include directory, and pass only the headers' base names to
CHECK_SYMBOL_EXISTS.

Modified:
    httpd/httpd/trunk/CMakeLists.txt

Modified: httpd/httpd/trunk/CMakeLists.txt
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CMakeLists.txt?rev=1752331&r1=1752330&r2=1752331&view=diff
==============================================================================
--- httpd/httpd/trunk/CMakeLists.txt (original)
+++ httpd/httpd/trunk/CMakeLists.txt Tue Jul 12 19:13:34 2016
@@ -125,7 +125,8 @@ GET_MOD_ENABLE_RANK("ENABLE_MODULES sett
 # not defined to either 1 or 0)
 
 MACRO(CHECK_APR_FEATURE which_define)
-  CHECK_SYMBOL_EXISTS(${which_define} "${APR_INCLUDE_DIR}/apr.h;${APR_INCLUDE_DIR}/apu.h"
tmp_${which_define})
+  SET(CMAKE_REQUIRED_INCLUDES "${APR_INCLUDE_DIR}")
+  CHECK_SYMBOL_EXISTS(${which_define} "apr.h;apu.h" tmp_${which_define})
   IF(${tmp_${which_define}})
     CHECK_C_SOURCE_COMPILES("#include \"${APR_INCLUDE_DIR}/apr.h\"
       #include \"${APR_INCLUDE_DIR}/apu.h\"



Mime
View raw message