aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libtest')
-rw-r--r--tests/libtest/CMakeLists.txt11
1 files changed, 6 insertions, 5 deletions
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")