Fossil SCM

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

Keyboard Shortcuts

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