Fossil SCM

fossil-scm / compat / zlib / contrib / blast / test / CMakeLists.txt
Source Blame History 193 lines
6ea30fb… florian 1 # if we are built from with zlib, use this path's)
6ea30fb… florian 2 if(DEFINED ZLIB_BUILD_BLAST)
6ea30fb… florian 3 set(WORK_DIR ${zlib_BINARY_DIR})
6ea30fb… florian 4 set(inst_setup zlib_install)
6ea30fb… florian 5 else(DEFINED ZLIB_BUILD_BLAST)
6ea30fb… florian 6 set(WORK_DIR ${blast_BINARY_DIR})
6ea30fb… florian 7 set(inst_setup zlib_blast_install)
6ea30fb… florian 8 set(ZLIB_ARG "-DZLIB_DIR=${ZLIB_DIR}")
6ea30fb… florian 9
6ea30fb… florian 10 add_test(
6ea30fb… florian 11 NAME zlib_blast_install
6ea30fb… florian 12 COMMAND ${CMAKE_COMMAND} --install ${blast_BINARY_DIR} --prefix
6ea30fb… florian 13 ${CMAKE_CURRENT_BINARY_DIR}/test_install --config $<CONFIG>
6ea30fb… florian 14 WORKING_DIRECTORY ${blast_BINARY_DIR})
6ea30fb… florian 15
6ea30fb… florian 16 set_tests_properties(zlib_blast_install
6ea30fb… florian 17 PROPERTIES
6ea30fb… florian 18 FIXTURES_SETUP zlib_blast_install)
6ea30fb… florian 19 endif(DEFINED ZLIB_BUILD_BLAST)
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_blast_find_package_configure
6ea30fb… florian 60 COMMAND
6ea30fb… florian 61 ${CMAKE_COMMAND} ${PLATFORM}
6ea30fb… florian 62 -B${CMAKE_CURRENT_BINARY_DIR}/findpackage_test_build
6ea30fb… florian 63 -DCMAKE_BUILD_TYPE=$<CONFIG>
6ea30fb… florian 64 -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
6ea30fb… florian 65 -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
6ea30fb… florian 66 -DCMAKE_INSTALL_PREFIX=${WORK_DIR}/test/test_install ${ZLIB_ARG}
6ea30fb… florian 67 --fresh
6ea30fb… florian 68 -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 zlib_blast_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 zlib_blast_find_package_configure
6ea30fb… florian 78 PROPERTIES
6ea30fb… florian 79 FIXTURES_REQUIRED ${inst_setup}
6ea30fb… florian 80 FIXTURES_SETUP blast_fp_config)
6ea30fb… florian 81
6ea30fb… florian 82 set_tests_properties(zlib_blast_find_package_build
6ea30fb… florian 83 PROPERTIES
6ea30fb… florian 84 FIXTURES_REQUIRED blast_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_blast_add_subdirectory_configure
6ea30fb… florian 91 COMMAND
6ea30fb… florian 92 ${CMAKE_COMMAND} ${PLATFORM}
6ea30fb… florian 93 -B${CMAKE_CURRENT_BINARY_DIR}/add_subdirectory_test_build
6ea30fb… florian 94 -DCMAKE_BUILD_TYPE=$<CONFIG>
6ea30fb… florian 95 -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
6ea30fb… florian 96 -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
6ea30fb… florian 97 -DCMAKE_INSTALL_PREFIX=${WORK_DIR}/test/test_install ${ZLIB_ARG}
6ea30fb… florian 98 --fresh
6ea30fb… florian 99 -G "${CMAKE_GENERATOR}"
6ea30fb… florian 100 -S${CMAKE_CURRENT_BINARY_DIR}/add_subdirectory_test)
6ea30fb… florian 101
6ea30fb… florian 102 add_test(
6ea30fb… florian 103 NAME zlib_blast_add_subdirectory_build
6ea30fb… florian 104 COMMAND ${CMAKE_COMMAND} --build . --config $<CONFIG>
6ea30fb… florian 105 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/add_subdirectory_test_build)
6ea30fb… florian 106
6ea30fb… florian 107 set_tests_properties(
6ea30fb… florian 108 zlib_blast_add_subdirectory_configure
6ea30fb… florian 109 PROPERTIES
6ea30fb… florian 110 FIXTURES_REQUIRED ${inst_setup}
6ea30fb… florian 111 FIXTURES_SETUP blast_as_config)
6ea30fb… florian 112
6ea30fb… florian 113 set_tests_properties(zlib_blast_add_subdirectory_build
6ea30fb… florian 114 PROPERTIES
6ea30fb… florian 115 FIXTURES_REQUIRED blast_as_config)
6ea30fb… florian 116
6ea30fb… florian 117 #
6ea30fb… florian 118 # add_subdirectory_exclude_test
6ea30fb… florian 119 #
6ea30fb… florian 120 add_test(
6ea30fb… florian 121 NAME zlib_blast_add_subdirectory_exclude_configure
6ea30fb… florian 122 COMMAND
6ea30fb… florian 123 ${CMAKE_COMMAND} ${PLATFORM}
6ea30fb… florian 124 -B${CMAKE_CURRENT_BINARY_DIR}/add_subdirectory_exclude_test_build
6ea30fb… florian 125 -DCMAKE_BUILD_TYPE=$<CONFIG>
6ea30fb… florian 126 -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_blast_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_blast_add_subdirectory_exclude_configure
6ea30fb… florian 140 PROPERTIES
6ea30fb… florian 141 FIXTURES_REQUIRED ${inst_setup}
6ea30fb… florian 142 FIXTURES_SETUP blast_asx_config)
6ea30fb… florian 143
6ea30fb… florian 144 set_tests_properties(zlib_blast_add_subdirectory_exclude_build
6ea30fb… florian 145 PROPERTIES
6ea30fb… florian 146 FIXTURES_REQUIRED blast_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_blast_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(
6ea30fb… florian 164 zlib_blast_find_package_no_components_configure
6ea30fb… florian 165 PROPERTIES
6ea30fb… florian 166 FIXTURES_REQUIRED ${inst_setup})
6ea30fb… florian 167
6ea30fb… florian 168 if(NOT ZLIB_BLAST_BUILD_SHARED OR NOT ZLIB_BLAST_BUILD_STATIC)
6ea30fb… florian 169 set_tests_properties(zlib_blast_find_package_no_components_configure
6ea30fb… florian 170 PROPERTIES
6ea30fb… florian 171 WILL_FAIL TRUE)
6ea30fb… florian 172 endif(NOT ZLIB_BLAST_BUILD_SHARED OR NOT ZLIB_BLAST_BUILD_STATIC)
6ea30fb… florian 173
6ea30fb… florian 174 #
6ea30fb… florian 175 # findpackage_wrong_components_test
6ea30fb… florian 176 #
6ea30fb… florian 177 add_test(
6ea30fb… florian 178 NAME zlib_blast_find_package_wrong_components_configure
6ea30fb… florian 179 COMMAND
6ea30fb… florian 180 ${CMAKE_COMMAND} ${PLATFORM}
6ea30fb… florian 181 -B${CMAKE_CURRENT_BINARY_DIR}/findpackage_wrong_components_test_build
6ea30fb… florian 182 -DCMAKE_BUILD_TYPE=$<CONFIG> -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
6ea30fb… florian 183 -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
6ea30fb… florian 184 -DCMAKE_INSTALL_PREFIX=${WORK_DIR}/test/test_install ${ZLIB_ARG}
6ea30fb… florian 185 --fresh
6ea30fb… florian 186 -G "${CMAKE_GENERATOR}"
6ea30fb… florian 187 -S${CMAKE_CURRENT_BINARY_DIR}/findpackage_wrong_components_test)
6ea30fb… florian 188
6ea30fb… florian 189 set_tests_properties(zlib_blast_find_package_wrong_components_configure
6ea30fb… florian 190 PROPERTIES
6ea30fb… florian 191 FIXTURES_REQUIRED ${inst_setup}
6ea30fb… florian 192 WILL_FAIL TRUE)
6ea30fb… florian 193

Keyboard Shortcuts

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