Browse Source

Apply cmake-format

charconv
Martchus 2 years ago
parent
commit
98e6f360af
  1. 9
      cmake/modules/AppTarget.cmake
  2. 6
      cmake/modules/LibraryTarget.cmake
  3. 9
      cmake/modules/TestTarget.cmake
  4. 7
      cmake/modules/TestUtilities.cmake

9
cmake/modules/AppTarget.cmake

@ -56,9 +56,12 @@ target_compile_options(
PRIVATE "${META_PRIVATE_COMPILE_OPTIONS}")
set_target_properties(
${META_TARGET_NAME}
PROPERTIES CXX_STANDARD "${META_CXX_STANDARD}" C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden
LINK_SEARCH_START_STATIC ${STATIC_LINKAGE} LINK_SEARCH_END_STATIC ${STATIC_LINKAGE} AUTOGEN_TARGET_DEPENDS
"${AUTOGEN_DEPS}")
PROPERTIES CXX_STANDARD "${META_CXX_STANDARD}"
C_VISIBILITY_PRESET hidden
CXX_VISIBILITY_PRESET hidden
LINK_SEARCH_START_STATIC ${STATIC_LINKAGE}
LINK_SEARCH_END_STATIC ${STATIC_LINKAGE}
AUTOGEN_TARGET_DEPENDS "${AUTOGEN_DEPS}")
# set properties for macOS bundle and generate icon for macOS bundle
if (GUI_TYPE STREQUAL "MACOSX_BUNDLE")

6
cmake/modules/LibraryTarget.cmake

@ -207,8 +207,10 @@ if (META_HEADER_ONLY_LIB)
"${META_PRIVATE_COMPILE_OPTIONS}")
set_target_properties(
${META_TARGET_NAME}_interface_sources_for_qtcreator
PROPERTIES VERSION "${META_VERSION_MAJOR}.${META_VERSION_MINOR}.${META_VERSION_PATCH}" SOVERSION "${META_SOVERSION}"
CXX_STANDARD "${META_CXX_STANDARD}" AUTOGEN_TARGET_DEPENDS "${AUTOGEN_DEPS}")
PROPERTIES VERSION "${META_VERSION_MAJOR}.${META_VERSION_MINOR}.${META_VERSION_PATCH}"
SOVERSION "${META_SOVERSION}"
CXX_STANDARD "${META_CXX_STANDARD}"
AUTOGEN_TARGET_DEPENDS "${AUTOGEN_DEPS}")
endif ()
# generate CMake code to configure additional arguments for required CMake-packages

9
cmake/modules/TestTarget.cmake

@ -115,9 +115,12 @@ if (META_PROJECT_IS_APPLICATION AND LINK_TESTS_AGAINST_APP_TARGET)
PRIVATE "${META_PRIVATE_COMPILE_OPTIONS}")
set_target_properties(
${META_TARGET_NAME}_testlib
PROPERTIES CXX_STANDARD "${META_CXX_STANDARD}" C_VISIBILITY_PRESET default CXX_VISIBILITY_PRESET default
LINK_SEARCH_START_STATIC ${STATIC_LINKAGE} LINK_SEARCH_END_STATIC ${STATIC_LINKAGE} AUTOGEN_TARGET_DEPENDS
"${AUTOGEN_DEPS}")
PROPERTIES CXX_STANDARD "${META_CXX_STANDARD}"
C_VISIBILITY_PRESET default
CXX_VISIBILITY_PRESET default
LINK_SEARCH_START_STATIC ${STATIC_LINKAGE}
LINK_SEARCH_END_STATIC ${STATIC_LINKAGE}
AUTOGEN_TARGET_DEPENDS "${AUTOGEN_DEPS}")
if (CPP_UNIT_CONFIG_${META_PROJECT_NAME}_FOUND)
target_include_directories(${META_TARGET_NAME}_testlib
PRIVATE "${CPP_UNIT_CONFIG_${META_PROJECT_NAME}_INCLUDE_DIRS}")

7
cmake/modules/TestUtilities.cmake

@ -57,8 +57,11 @@ function (configure_test_target)
PRIVATE "${META_PRIVATE_COMPILE_OPTIONS}")
set_target_properties(
"${TEST_TARGET_NAME}"
PROPERTIES CXX_STANDARD "${META_CXX_STANDARD}" C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden
LINK_SEARCH_START_STATIC ${STATIC_LINKAGE} LINK_SEARCH_END_STATIC ${STATIC_LINKAGE})
PROPERTIES CXX_STANDARD "${META_CXX_STANDARD}"
C_VISIBILITY_PRESET hidden
CXX_VISIBILITY_PRESET hidden
LINK_SEARCH_START_STATIC ${STATIC_LINKAGE}
LINK_SEARCH_END_STATIC ${STATIC_LINKAGE})
# make the test recognized by ctest
if (NOT ARGS_MANUAL)

Loading…
Cancel
Save