mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
Fixed compile defines in CMake scripts
This commit is contained in:
parent
ece891d6db
commit
25f626cc52
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
# TODO:
|
# TODO:
|
||||||
# The output .so file lacks the soname number which we currently have within the lib/Makefile.am file
|
# 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 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 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(?)
|
# Add CTests(?)
|
||||||
@ -58,6 +59,13 @@ ENDIF()
|
|||||||
OPTION(BUILD_CURL_EXE "Set to ON to build cURL executable." ON)
|
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(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(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)
|
IF(MSVC)
|
||||||
OPTION(BUILD_RELEASE_DEBUG_DIRS "Set OFF to build each configuration to a separate directory" OFF)
|
OPTION(BUILD_RELEASE_DEBUG_DIRS "Set OFF to build each configuration to a separate directory" OFF)
|
||||||
MARK_AS_ADVANCED(BUILD_RELEASE_DEBUG_DIRS)
|
MARK_AS_ADVANCED(BUILD_RELEASE_DEBUG_DIRS)
|
||||||
@ -838,12 +846,6 @@ IF(BUILD_CURL_TESTS)
|
|||||||
ADD_SUBDIRECTORY(tests)
|
ADD_SUBDIRECTORY(tests)
|
||||||
ENDIF()
|
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.
|
# 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)
|
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")
|
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")
|
||||||
|
@ -97,9 +97,7 @@ IF(WIN32)
|
|||||||
ADD_DEFINITIONS( -D_USRDLL )
|
ADD_DEFINITIONS( -D_USRDLL )
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
ADD_DEFINITIONS(
|
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES COMPILE_DEFINITIONS BUILDING_LIBCURL)
|
||||||
-DBUILDING_LIBCURL
|
|
||||||
)
|
|
||||||
|
|
||||||
SETUP_CURL_DEPENDENCIES(${LIB_NAME})
|
SETUP_CURL_DEPENDENCIES(${LIB_NAME})
|
||||||
|
|
||||||
|
@ -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} )
|
ADD_EXECUTABLE( ${TEST_NAME} ${ARGN} )
|
||||||
STRING(TOUPPER TEST_NAME UPPER_TEST_NAME)
|
STRING(TOUPPER ${TEST_NAME} UPPER_TEST_NAME)
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(
|
INCLUDE_DIRECTORIES(
|
||||||
${CURL_SOURCE_DIR}/lib # To be able to reach "setup_once.h"
|
${CURL_SOURCE_DIR}/lib # To be able to reach "setup_once.h"
|
||||||
@ -12,7 +12,7 @@ MACRO(SETUP_TEST TEST_NAME) # ARGN are the files in the test
|
|||||||
SETUP_CURL_DEPENDENCIES(${TEST_NAME})
|
SETUP_CURL_DEPENDENCIES(${TEST_NAME})
|
||||||
TARGET_LINK_LIBRARIES( ${TEST_NAME} libcurl )
|
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
|
# 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}")
|
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)
|
IF(NOT BUILD_RELEASE_DEBUG_DIRS)
|
||||||
# Ugly workaround to remove the "/debug" or "/release" in each output
|
# Ugly workaround to remove the "/debug" or "/release" in each output
|
||||||
SET_TARGET_PROPERTIES(${TEST_NAME} PROPERTIES PREFIX "../")
|
SET_TARGET_PROPERTIES(${TEST_NAME} PROPERTIES PREFIX "../")
|
||||||
|
SET_TARGET_PROPERTIES(${TEST_NAME} PROPERTIES IMPORT_PREFIX "../")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
ENDMACRO()
|
ENDFUNCTION()
|
||||||
|
|
||||||
|
|
||||||
TRANSFORM_MAKEFILE_INC("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
|
TRANSFORM_MAKEFILE_INC("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
|
||||||
|
@ -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} )
|
ADD_EXECUTABLE( ${TEST_NAME} ${ARGN} )
|
||||||
STRING(TOUPPER TEST_NAME UPPER_TEST_NAME)
|
STRING(TOUPPER ${TEST_NAME} UPPER_TEST_NAME)
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(
|
INCLUDE_DIRECTORIES(
|
||||||
${CURL_SOURCE_DIR}/lib # To be able to reach "setup_once.h"
|
${CURL_SOURCE_DIR}/lib # To be able to reach "setup_once.h"
|
||||||
@ -12,7 +12,7 @@ MACRO(SETUP_EXECUTABLE TEST_NAME) # ARGN are the files in the test
|
|||||||
SETUP_CURL_DEPENDENCIES(${TEST_NAME})
|
SETUP_CURL_DEPENDENCIES(${TEST_NAME})
|
||||||
#TARGET_LINK_LIBRARIES( ${TEST_NAME} libcurl )
|
#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
|
# 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}")
|
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)
|
IF(NOT BUILD_RELEASE_DEBUG_DIRS)
|
||||||
# Ugly workaround to remove the "/debug" or "/release" in each output
|
# Ugly workaround to remove the "/debug" or "/release" in each output
|
||||||
SET_TARGET_PROPERTIES(${TEST_NAME} PROPERTIES PREFIX "../")
|
SET_TARGET_PROPERTIES(${TEST_NAME} PROPERTIES PREFIX "../")
|
||||||
|
SET_TARGET_PROPERTIES(${TEST_NAME} PROPERTIES IMPORT_PREFIX "../")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
ENDMACRO()
|
ENDFUNCTION()
|
||||||
|
|
||||||
|
|
||||||
TRANSFORM_MAKEFILE_INC("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
|
TRANSFORM_MAKEFILE_INC("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
|
||||||
|
Loading…
Reference in New Issue
Block a user