Fossil SCM

fossil-scm / compat / zlib / contrib / minizip / test / CMakeLists.txt
Source Blame History 176 lines
6ea30fb… florian 1 # if we are built from with zlib, use this path's)
6ea30fb… florian 2 if(DEFINED ZLIB_BUILD_MINIZIP)
6ea30fb… florian 3 set(WORK_DIR ${zlib_BINARY_DIR})
6ea30fb… florian 4 set(inst_setup zlib_install)
6ea30fb… florian 5 else(DEFINED ZLIB_BUILD_MINIZIP)
6ea30fb… florian 6 set(WORK_DIR ${minizip_BINARY_DIR})
6ea30fb… florian 7 set(inst_setup minizip_install)
6ea30fb… florian 8 set(ZLIB_ARG "-DZLIB_DIR=${ZLIB_DIR}")
6ea30fb… florian 9
6ea30fb… florian 10 add_test(
6ea30fb… florian 11 NAME minizip_install
6ea30fb… florian 12 COMMAND ${CMAKE_COMMAND} --install ${minizip_BINARY_DIR} --prefix
6ea30fb… florian 13 ${CMAKE_CURRENT_BINARY_DIR}/test_install --config $<CONFIG>
6ea30fb… florian 14 WORKING_DIRECTORY ${minizip_BINARY_DIR})
6ea30fb… florian 15
6ea30fb… florian 16 set_tests_properties(minizip_install
6ea30fb… florian 17 PROPERTIES
6ea30fb… florian 18 FIXTURES_SETUP minizip_install)
6ea30fb… florian 19 endif(DEFINED ZLIB_BUILD_MINIZIP)
6ea30fb… florian 20
6ea30fb… florian 21 file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/findpackage_test)
6ea30fb… florian 22 file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/findpackage_no_componentstest)
6ea30fb… florian 23 file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/findpackage_wrong_components_test)
6ea30fb… florian 24 file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/add_subdirectory_test)
6ea30fb… florian 25 file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/add_subdirectory_exclude_test)
6ea30fb… florian 26
6ea30fb… florian 27 configure_file(
6ea30fb… florian 28 ${CMAKE_CURRENT_SOURCE_DIR}/find_package_test.cmake.in
6ea30fb… florian 29 ${CMAKE_CURRENT_BINARY_DIR}/findpackage_test/CMakeLists.txt @ONLY)
6ea30fb… florian 30
6ea30fb… florian 31 configure_file(
6ea30fb… florian 32 ${CMAKE_CURRENT_SOURCE_DIR}/find_package_no_components_test.cmake.in
6ea30fb… florian 33 ${CMAKE_CURRENT_BINARY_DIR}/findpackage_no_components_test/CMakeLists.txt
6ea30fb… florian 34 @ONLY)
6ea30fb… florian 35
6ea30fb… florian 36 configure_file(
6ea30fb… florian 37 ${CMAKE_CURRENT_SOURCE_DIR}/find_package_wrong_components_test.cmake.in
6ea30fb… florian 38 ${CMAKE_CURRENT_BINARY_DIR}/findpackage_wrong_components_test/CMakeLists.txt
6ea30fb… florian 39 @ONLY)
6ea30fb… florian 40
6ea30fb… florian 41 configure_file(
6ea30fb… florian 42 ${CMAKE_CURRENT_SOURCE_DIR}/add_subdirectory_test.cmake.in
6ea30fb… florian 43 ${CMAKE_CURRENT_BINARY_DIR}/add_subdirectory_test/CMakeLists.txt @ONLY)
6ea30fb… florian 44
6ea30fb… florian 45 configure_file(
6ea30fb… florian 46 ${CMAKE_CURRENT_SOURCE_DIR}/add_subdirectory_exclude_test.cmake.in
6ea30fb… florian 47 ${CMAKE_CURRENT_BINARY_DIR}/add_subdirectory_exclude_test/CMakeLists.txt
6ea30fb… florian 48 @ONLY)
6ea30fb… florian 49
6ea30fb… florian 50 # CMAKE_GENERATOR_PLATFORM doesn't work in the if
6ea30fb… florian 51 set(GENERATOR ${CMAKE_GENERATOR_PLATFORM})
6ea30fb… florian 52
6ea30fb… florian 53 if(GENERATOR)
6ea30fb… florian 54 set(PLATFORM "-A ${GENERATOR}")
6ea30fb… florian 55 endif(GENERATOR)
6ea30fb… florian 56
6ea30fb… florian 57 #
6ea30fb… florian 58 # findpackage_test
6ea30fb… florian 59 #
6ea30fb… florian 60 add_test(
6ea30fb… florian 61 NAME minizip_find_package_configure
6ea30fb… florian 62 COMMAND
6ea30fb… florian 63 ${CMAKE_COMMAND} ${PLATFORM}
6ea30fb… florian 64 -B${CMAKE_CURRENT_BINARY_DIR}/findpackage_test_build
6ea30fb… florian 65 -DCMAKE_BUILD_TYPE=$<CONFIG> -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
6ea30fb… florian 66 -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
6ea30fb… florian 67 -DCMAKE_INSTALL_PREFIX=${WORK_DIR}/test/test_install ${ZLIB_ARG}
6ea30fb… florian 68 --fresh -G "${CMAKE_GENERATOR}"
6ea30fb… florian 69 -S${CMAKE_CURRENT_BINARY_DIR}/findpackage_test)
6ea30fb… florian 70
6ea30fb… florian 71 add_test(
6ea30fb… florian 72 NAME minizip_find_package_build
6ea30fb… florian 73 COMMAND ${CMAKE_COMMAND} --build . --config $<CONFIG>
6ea30fb… florian 74 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/findpackage_test_build)
6ea30fb… florian 75
6ea30fb… florian 76 set_tests_properties(
6ea30fb… florian 77 minizip_find_package_configure PROPERTIES FIXTURES_REQUIRED ${inst_setup}
6ea30fb… florian 78 FIXTURES_SETUP mzfp_config)
6ea30fb… florian 79
6ea30fb… florian 80 set_tests_properties(minizip_find_package_build PROPERTIES FIXTURES_REQUIRED
6ea30fb… florian 81 mzfp_config)
6ea30fb… florian 82
6ea30fb… florian 83 #
6ea30fb… florian 84 # findpackage_no_components_test
6ea30fb… florian 85 #
6ea30fb… florian 86 add_test(
6ea30fb… florian 87 NAME minizip_find_package_no_components_configure
6ea30fb… florian 88 COMMAND
6ea30fb… florian 89 ${CMAKE_COMMAND} ${PLATFORM}
6ea30fb… florian 90 -B${CMAKE_CURRENT_BINARY_DIR}/findpackage_no_components_test_build
6ea30fb… florian 91 -DCMAKE_BUILD_TYPE=$<CONFIG> -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
6ea30fb… florian 92 -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
6ea30fb… florian 93 -DCMAKE_INSTALL_PREFIX=${WORK_DIR}/test/test_install ${ZLIB_ARG}
6ea30fb… florian 94 --fresh -G "${CMAKE_GENERATOR}"
6ea30fb… florian 95 -S${CMAKE_CURRENT_BINARY_DIR}/findpackage_no_components_test)
6ea30fb… florian 96
6ea30fb… florian 97 set_tests_properties(
6ea30fb… florian 98 minizip_find_package_no_components_configure PROPERTIES FIXTURES_REQUIRED ${inst_setup})
6ea30fb… florian 99
6ea30fb… florian 100 if(NOT MINIZIP_BUILD_SHARED OR NOT MINIZIP_BUILD_STATIC)
6ea30fb… florian 101 set_tests_properties(
6ea30fb… florian 102 minizip_find_package_no_components_configure PROPERTIES WILL_FAIL TRUE)
6ea30fb… florian 103 endif(NOT MINIZIP_BUILD_SHARED OR NOT MINIZIP_BUILD_STATIC)
6ea30fb… florian 104
6ea30fb… florian 105 #
6ea30fb… florian 106 # findpackage_no_components_test
6ea30fb… florian 107 #
6ea30fb… florian 108 add_test(
6ea30fb… florian 109 NAME minizip_find_package_wrong_components_configure
6ea30fb… florian 110 COMMAND
6ea30fb… florian 111 ${CMAKE_COMMAND} ${PLATFORM}
6ea30fb… florian 112 -B${CMAKE_CURRENT_BINARY_DIR}/findpackage_wrong_components_test_build
6ea30fb… florian 113 -DCMAKE_BUILD_TYPE=$<CONFIG> -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
6ea30fb… florian 114 -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
6ea30fb… florian 115 -DCMAKE_INSTALL_PREFIX=${WORK_DIR}/test/test_install ${ZLIB_ARG}
6ea30fb… florian 116 --fresh -G "${CMAKE_GENERATOR}"
6ea30fb… florian 117 -S${CMAKE_CURRENT_BINARY_DIR}/findpackage_wrong_components_test)
6ea30fb… florian 118
6ea30fb… florian 119 set_tests_properties(
6ea30fb… florian 120 minizip_find_package_wrong_components_configure
6ea30fb… florian 121 PROPERTIES
6ea30fb… florian 122 FIXTURES_REQUIRED ${inst_setup}
6ea30fb… florian 123 WILL_FAIL TRUE)
6ea30fb… florian 124
6ea30fb… florian 125 #
6ea30fb… florian 126 # add_subdirectory_test
6ea30fb… florian 127 #
6ea30fb… florian 128 add_test(
6ea30fb… florian 129 NAME minizip_add_subdirectory_configure
6ea30fb… florian 130 COMMAND
6ea30fb… florian 131 ${CMAKE_COMMAND} ${PLATFORM}
6ea30fb… florian 132 -B${CMAKE_CURRENT_BINARY_DIR}/add_subdirectory_test_build
6ea30fb… florian 133 -DCMAKE_BUILD_TYPE=$<CONFIG> -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
6ea30fb… florian 134 -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
6ea30fb… florian 135 -DCMAKE_INSTALL_PREFIX=${WORK_DIR}/test/test_install ${ZLIB_ARG}
6ea30fb… florian 136 --fresh -G "${CMAKE_GENERATOR}"
6ea30fb… florian 137 -S${CMAKE_CURRENT_BINARY_DIR}/add_subdirectory_test)
6ea30fb… florian 138
6ea30fb… florian 139 add_test(
6ea30fb… florian 140 NAME minizip_add_subdirectory_build
6ea30fb… florian 141 COMMAND ${CMAKE_COMMAND} --build . --config $<CONFIG>
6ea30fb… florian 142 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/add_subdirectory_test_build)
6ea30fb… florian 143
6ea30fb… florian 144 set_tests_properties(
6ea30fb… florian 145 minizip_add_subdirectory_configure
6ea30fb… florian 146 PROPERTIES FIXTURES_REQUIRED ${inst_setup} FIXTURES_SETUP mzas_config)
6ea30fb… florian 147
6ea30fb… florian 148 set_tests_properties(minizip_add_subdirectory_build PROPERTIES FIXTURES_REQUIRED
6ea30fb… florian 149 mzas_config)
6ea30fb… florian 150
6ea30fb… florian 151 #
6ea30fb… florian 152 # add_subdirectory_exclude_test
6ea30fb… florian 153 #
6ea30fb… florian 154 add_test(
6ea30fb… florian 155 NAME minizip_add_subdirectory_exclude_configure
6ea30fb… florian 156 COMMAND
6ea30fb… florian 157 ${CMAKE_COMMAND} ${PLATFORM}
6ea30fb… florian 158 -B${CMAKE_CURRENT_BINARY_DIR}/add_subdirectory_exclude_test_build
6ea30fb… florian 159 -DCMAKE_BUILD_TYPE=$<CONFIG> -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
6ea30fb… florian 160 -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
6ea30fb… florian 161 -DCMAKE_INSTALL_PREFIX=${WORK_DIR}/test/test_install ${ZLIB_ARG}
6ea30fb… florian 162 --fresh -G "${CMAKE_GENERATOR}"
6ea30fb… florian 163 -S${CMAKE_CURRENT_BINARY_DIR}/add_subdirectory_exclude_test)
6ea30fb… florian 164
6ea30fb… florian 165 add_test(
6ea30fb… florian 166 NAME minizip_add_subdirectory_exclude_build
6ea30fb… florian 167 COMMAND ${CMAKE_COMMAND} --build . --config $<CONFIG>
6ea30fb… florian 168 WORKING_DIRECTORY
6ea30fb… florian 169 ${CMAKE_CURRENT_BINARY_DIR}/add_subdirectory_exclude_test_build)
6ea30fb… florian 170
6ea30fb… florian 171 set_tests_properties(
6ea30fb… florian 172 minizip_add_subdirectory_exclude_configure
6ea30fb… florian 173 PROPERTIES FIXTURES_REQUIRED ${inst_setup} FIXTURES_SETUP mzasx_config)
6ea30fb… florian 174
6ea30fb… florian 175 set_tests_properties(minizip_add_subdirectory_exclude_build
6ea30fb… florian 176 PROPERTIES FIXTURES_REQUIRED mzasx_config)

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button