Avoid an indentation level in TestTarget.cmake
This commit is contained in:
parent
d5930c8d60
commit
522d2e8cc8
|
@ -104,10 +104,9 @@ if (META_PROJECT_IS_LIBRARY)
|
||||||
message(STATUS "Linking test target against ${META_TARGET_NAME}")
|
message(STATUS "Linking test target against ${META_TARGET_NAME}")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# handle testing an application
|
# create a 'testlib' and link tests against it when testing an application an the tests need to call internal
|
||||||
if (META_PROJECT_IS_APPLICATION)
|
# functions of the application
|
||||||
# using functions directly from the tests might be required -> also create a 'testlib' and link tests against it
|
if (META_PROJECT_IS_APPLICATION AND LINK_TESTS_AGAINST_APP_TARGET)
|
||||||
if (LINK_TESTS_AGAINST_APP_TARGET)
|
|
||||||
# create target for the 'testlib'
|
# create target for the 'testlib'
|
||||||
set(TESTLIB_FILES ${HEADER_FILES} ${SRC_FILES} ${WIDGETS_FILES} ${QML_FILES} ${RES_FILES} ${QM_FILES})
|
set(TESTLIB_FILES ${HEADER_FILES} ${SRC_FILES} ${WIDGETS_FILES} ${QML_FILES} ${RES_FILES} ${QM_FILES})
|
||||||
list(REMOVE_ITEM TESTLIB_FILES main.h main.cpp)
|
list(REMOVE_ITEM TESTLIB_FILES main.h main.cpp)
|
||||||
|
@ -147,7 +146,6 @@ if (META_PROJECT_IS_APPLICATION)
|
||||||
list(APPEND TEST_LIBRARIES ${META_TARGET_NAME}_testlib)
|
list(APPEND TEST_LIBRARIES ${META_TARGET_NAME}_testlib)
|
||||||
# ensure all symbols are visible (man gcc: "Despite the nomenclature, default always means public")
|
# ensure all symbols are visible (man gcc: "Despite the nomenclature, default always means public")
|
||||||
set_target_properties(${META_TARGET_NAME}_testlib PROPERTIES CXX_VISIBILITY_PRESET default)
|
set_target_properties(${META_TARGET_NAME}_testlib PROPERTIES CXX_VISIBILITY_PRESET default)
|
||||||
endif ()
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# configure test target
|
# configure test target
|
||||||
|
|
Loading…
Reference in New Issue