aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt14
-rw-r--r--lib/CMakeLists.txt4
-rw-r--r--tests/libtest/CMakeLists.txt11
-rw-r--r--tests/server/CMakeLists.txt11
4 files changed, 21 insertions, 19 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 31f260dd4..23c3c45ad 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,6 +3,7 @@
# TODO:
# The output .so file lacks the soname number which we currently have within the lib/Makefile.am file
+# Fix the Win32 "_beginthreadex" warning (According to Tetetest: The proto of this function is in process.h file, so first of all make sure that HAVE_PROCESS_H is defined. Second, this function is only available in multithread builds (_MT is defined, /MD or /MT compiler switch supplied). CMake does supply /MD switch to compiler (I have just checked this), so the reason must be the absense of HAVE_PROCESS_H.)
# Add full (4 or 5 libs) SSL support
# Add INSTALL target (EXTRA_DIST variables in Makefile.am may be moved to Makefile.inc so that CMake/CPack is aware of what's to include).
# Add CTests(?)
@@ -58,6 +59,13 @@ ENDIF()
OPTION(BUILD_CURL_EXE "Set to ON to build cURL executable." ON)
OPTION(BUILD_CURL_TESTS "Set to ON to build cURL tests." ON)
OPTION(CURL_STATICLIB "Set to ON to build libcurl with static linking." OFF)
+
+OPTION(BUILD_DASHBOARD_REPORTS "Set to ON to activate reporting of cURL builds here http://www.cdash.org/CDashPublic/index.php?project=CURL" OFF)
+IF(BUILD_DASHBOARD_REPORTS)
+ #INCLUDE(Dart)
+ INCLUDE(CTest)
+ENDIF(BUILD_DASHBOARD_REPORTS)
+
IF(MSVC)
OPTION(BUILD_RELEASE_DEBUG_DIRS "Set OFF to build each configuration to a separate directory" OFF)
MARK_AS_ADVANCED(BUILD_RELEASE_DEBUG_DIRS)
@@ -838,12 +846,6 @@ IF(BUILD_CURL_TESTS)
ADD_SUBDIRECTORY(tests)
ENDIF()
-OPTION(BUILD_DASHBOARD_REPORTS "Set to ON to activate reporting of cURL builds here http://www.cdash.org/CDashPublic/index.php?project=CURL" OFF)
-IF(BUILD_DASHBOARD_REPORTS)
- INCLUDE(Dart)
- #INCLUDE(CTest)
-ENDIF(BUILD_DASHBOARD_REPORTS)
-
# This needs to be run very last so other parts of the scripts can take advantage of this.
IF(NOT CURL_CONFIG_HAS_BEEN_RUN_BEFORE)
SET(CURL_CONFIG_HAS_BEEN_RUN_BEFORE 1 CACHE INTERNAL "Flag to track whether this is the first time running CMake or if CMake has been configured before")
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index f166945a1..12b422e5a 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -97,9 +97,7 @@ IF(WIN32)
ADD_DEFINITIONS( -D_USRDLL )
ENDIF()
-ADD_DEFINITIONS(
- -DBUILDING_LIBCURL
-)
+SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES COMPILE_DEFINITIONS BUILDING_LIBCURL)
SETUP_CURL_DEPENDENCIES(${LIB_NAME})
diff --git a/tests/libtest/CMakeLists.txt b/tests/libtest/CMakeLists.txt
index 247d63c3b..7b9f383b0 100644
--- a/tests/libtest/CMakeLists.txt
+++ b/tests/libtest/CMakeLists.txt
@@ -1,7 +1,7 @@
-MACRO(SETUP_TEST TEST_NAME) # ARGN are the files in the test
+FUNCTION(SETUP_TEST TEST_NAME) # ARGN are the files in the test
ADD_EXECUTABLE( ${TEST_NAME} ${ARGN} )
- STRING(TOUPPER TEST_NAME UPPER_TEST_NAME)
+ STRING(TOUPPER ${TEST_NAME} UPPER_TEST_NAME)
INCLUDE_DIRECTORIES(
${CURL_SOURCE_DIR}/lib # To be able to reach "setup_once.h"
@@ -12,8 +12,8 @@ MACRO(SETUP_TEST TEST_NAME) # ARGN are the files in the test
SETUP_CURL_DEPENDENCIES(${TEST_NAME})
TARGET_LINK_LIBRARIES( ${TEST_NAME} libcurl )
- ADD_DEFINITIONS( "-D${UPPER_TEST_NAME}" )
-
+ SET_TARGET_PROPERTIES(${TEST_NAME} PROPERTIES COMPILE_DEFINITIONS ${UPPER_TEST_NAME})
+
# Add the postfix to the executable since it is not added automatically as for modules and shared libraries
SET_TARGET_PROPERTIES(${TEST_NAME} PROPERTIES DEBUG_POSTFIX "${CMAKE_DEBUG_POSTFIX}")
@@ -21,10 +21,11 @@ MACRO(SETUP_TEST TEST_NAME) # ARGN are the files in the test
IF(NOT BUILD_RELEASE_DEBUG_DIRS)
# Ugly workaround to remove the "/debug" or "/release" in each output
SET_TARGET_PROPERTIES(${TEST_NAME} PROPERTIES PREFIX "../")
+ SET_TARGET_PROPERTIES(${TEST_NAME} PROPERTIES IMPORT_PREFIX "../")
ENDIF()
ENDIF()
-ENDMACRO()
+ENDFUNCTION()
TRANSFORM_MAKEFILE_INC("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
diff --git a/tests/server/CMakeLists.txt b/tests/server/CMakeLists.txt
index 2968a218b..c464a1f45 100644
--- a/tests/server/CMakeLists.txt
+++ b/tests/server/CMakeLists.txt
@@ -1,7 +1,7 @@
-MACRO(SETUP_EXECUTABLE TEST_NAME) # ARGN are the files in the test
+FUNCTION(SETUP_EXECUTABLE TEST_NAME) # ARGN are the files in the test
ADD_EXECUTABLE( ${TEST_NAME} ${ARGN} )
- STRING(TOUPPER TEST_NAME UPPER_TEST_NAME)
+ STRING(TOUPPER ${TEST_NAME} UPPER_TEST_NAME)
INCLUDE_DIRECTORIES(
${CURL_SOURCE_DIR}/lib # To be able to reach "setup_once.h"
@@ -12,8 +12,8 @@ MACRO(SETUP_EXECUTABLE TEST_NAME) # ARGN are the files in the test
SETUP_CURL_DEPENDENCIES(${TEST_NAME})
#TARGET_LINK_LIBRARIES( ${TEST_NAME} libcurl )
- ADD_DEFINITIONS( "-D${UPPER_TEST_NAME}" )
-
+ #SET_TARGET_PROPERTIES(${TEST_NAME} PROPERTIES COMPILE_DEFINITIONS ${UPPER_TEST_NAME})
+
# Add the postfix to the executable since it is not added automatically as for modules and shared libraries
SET_TARGET_PROPERTIES(${TEST_NAME} PROPERTIES DEBUG_POSTFIX "${CMAKE_DEBUG_POSTFIX}")
@@ -21,10 +21,11 @@ MACRO(SETUP_EXECUTABLE TEST_NAME) # ARGN are the files in the test
IF(NOT BUILD_RELEASE_DEBUG_DIRS)
# Ugly workaround to remove the "/debug" or "/release" in each output
SET_TARGET_PROPERTIES(${TEST_NAME} PROPERTIES PREFIX "../")
+ SET_TARGET_PROPERTIES(${TEST_NAME} PROPERTIES IMPORT_PREFIX "../")
ENDIF()
ENDIF()
-ENDMACRO()
+ENDFUNCTION()
TRANSFORM_MAKEFILE_INC("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")