serf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1835101 - in /serf/trunk: CMakeLists.txt test/CMakeLists.txt
Date Thu, 05 Jul 2018 07:12:21 GMT
Author: brane
Date: Thu Jul  5 07:12:21 2018
New Revision: 1835101

URL: http://svn.apache.org/viewvc?rev=1835101&view=rev
Log:
In CMake, define the project-wide source directory for the test build.

* CMakeLists.txt
  (SERF_SOURCE_DIR): New, used instead of CMAKE_CURRENT_SOURCE_DIR.
* test/CMakeLists.txt: Use SERF_SOURCE_DIR instead of CMAKE_SOURCE_DIR.

Modified:
    serf/trunk/CMakeLists.txt
    serf/trunk/test/CMakeLists.txt

Modified: serf/trunk/CMakeLists.txt
URL: http://svn.apache.org/viewvc/serf/trunk/CMakeLists.txt?rev=1835101&r1=1835100&r2=1835101&view=diff
==============================================================================
--- serf/trunk/CMakeLists.txt (original)
+++ serf/trunk/CMakeLists.txt Thu Jul  5 07:12:21 2018
@@ -18,7 +18,8 @@
 
 cmake_minimum_required(VERSION 3.0.2)
 
-list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/build")
+set(SERF_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
+set(CMAKE_MODULE_PATH "${SERF_SOURCE_DIR}/build")
 include(SerfVersion)
 
 project("Serf" VERSION ${SERF_VERSION} LANGUAGES C)
@@ -135,7 +136,7 @@ if(SERF_WINDOWS)
             -DSERF_DEF_HEADERS="${HEADERS}"
             -DSERF_DEF_FILE="${SERF_DEF_FILE}"
             -P "build/SerfWindowsGenDef.cmake"
-    WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+    WORKING_DIRECTORY "${SERF_SOURCE_DIR}"
   )
   set(SHARED_SOURCES "serf.rc" "${SERF_DEF_FILE}")
 
@@ -220,7 +221,7 @@ list(REMOVE_DUPLICATES DEPENDENCY_LIBRAR
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${APR_CFLAGS}")
 
 include_directories(BEFORE SYSTEM ${DEPENDENCY_INCLUDES})
-include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+include_directories(${SERF_SOURCE_DIR})
 
 
 # Feature tests

Modified: serf/trunk/test/CMakeLists.txt
URL: http://svn.apache.org/viewvc/serf/trunk/test/CMakeLists.txt?rev=1835101&r1=1835100&r2=1835101&view=diff
==============================================================================
--- serf/trunk/test/CMakeLists.txt (original)
+++ serf/trunk/test/CMakeLists.txt Thu Jul  5 07:12:21 2018
@@ -70,4 +70,4 @@ endforeach()
 add_test(NAME test_all COMMAND test_all)
 
 set_tests_properties(${RESPONSE_TESTS} test_all PROPERTIES
-                     ENVIRONMENT srcdir=${CMAKE_SOURCE_DIR})
+                     ENVIRONMENT srcdir=${SERF_SOURCE_DIR})



Mime
View raw message