Reduce indentation in TestTarget.cmake
This commit is contained in:
parent
a0dff23c26
commit
f66aa33d61
|
@ -33,18 +33,23 @@ if(NOT META_NO_CPP_UNIT)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CPP_UNIT_LIB)
|
if(NOT CPP_UNIT_LIB)
|
||||||
|
message(WARNING "Unable to add test target because cppunit could not be located.")
|
||||||
|
set(META_HAVE_TESTS NO)
|
||||||
|
set(TEST_CONFIG_DONE YES)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
list(APPEND TEST_LIBRARIES "${CPP_UNIT_LIB}")
|
list(APPEND TEST_LIBRARIES "${CPP_UNIT_LIB}")
|
||||||
if(NOT CPP_UNIT_CONFIG_${META_PROJECT_NAME}_FOUND)
|
if(NOT CPP_UNIT_CONFIG_${META_PROJECT_NAME}_FOUND)
|
||||||
message(WARNING "Cppunit not detected via pkg-config so the version couldn't be checked. Required version for ${META_PROJECT_NAME} is ${META_REQUIRED_CPP_UNIT_VERSION}.")
|
message(WARNING "Cppunit not detected via pkg-config so the version couldn't be checked. Required version for ${META_PROJECT_NAME} is ${META_REQUIRED_CPP_UNIT_VERSION}.")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
if(CPP_UNIT_INCLUDE_DIR)
|
if(CPP_UNIT_INCLUDE_DIR)
|
||||||
list(APPEND TEST_INCLUDE_DIRS "${CPP_UNIT_INCLUDE_DIR}")
|
list(APPEND TEST_INCLUDE_DIRS "${CPP_UNIT_INCLUDE_DIR}")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CPP_UNIT_LIB OR META_NO_CPP_UNIT)
|
|
||||||
# always link test applications against c++utilities
|
# always link test applications against c++utilities
|
||||||
list(APPEND TEST_LIBRARIES ${CPP_UTILITIES_LIB})
|
list(APPEND TEST_LIBRARIES ${CPP_UTILITIES_LIB})
|
||||||
|
|
||||||
|
@ -341,10 +346,4 @@ if(CPP_UNIT_LIB OR META_NO_CPP_UNIT)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(META_HAVE_TESTS YES)
|
set(META_HAVE_TESTS YES)
|
||||||
|
|
||||||
else()
|
|
||||||
message(WARNING "Unable to add test target because cppunit could not be located.")
|
|
||||||
set(META_HAVE_TESTS NO)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(TEST_CONFIG_DONE YES)
|
set(TEST_CONFIG_DONE YES)
|
||||||
|
|
Loading…
Reference in New Issue