1 Star 0 Fork 31

搬砖现场/imageinfo

forked from xiaozhuai/imageinfo 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CMakeLists.txt 1.36 KB
一键复制 编辑 原始数据 按行查看 历史
xiaozhuai 提交于 2021-04-06 13:00 . optimize tests
cmake_minimum_required(VERSION 3.2)
project(imageinfo)
set(CMAKE_CXX_STANDARD 11)
#if (MSVC)
# set(CompilerFlags
# CMAKE_CXX_FLAGS
# CMAKE_CXX_FLAGS_DEBUG
# CMAKE_CXX_FLAGS_RELEASE
# CMAKE_CXX_FLAGS_MINSIZEREL
# CMAKE_CXX_FLAGS_RELWITHDEBINFO
# CMAKE_C_FLAGS
# CMAKE_C_FLAGS_DEBUG
# CMAKE_C_FLAGS_RELEASE
# CMAKE_C_FLAGS_MINSIZEREL
# CMAKE_C_FLAGS_RELWITHDEBINFO)
# foreach(CompilerFlag ${CompilerFlags})
# string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}")
# set(${CompilerFlag} "${${CompilerFlag}}" CACHE STRING "msvc compiler flags" FORCE)
# endforeach()
#endif ()
if (APPLE)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.10)
endif ()
add_executable(imageinfo main.cpp imageinfo.hpp)
enable_testing()
add_executable(test_files test_files.cpp imageinfo.hpp)
target_compile_definitions(test_files PRIVATE -DIMAGES_DIRECTORY="${CMAKE_CURRENT_SOURCE_DIR}/images/")
add_test(NAME test_files COMMAND test_files)
if (CMAKE_CONFIGURATION_TYPES)
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}
--force-new-ctest-process --output-on-failure
--build-config "$<CONFIGURATION>")
else ()
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}
--force-new-ctest-process --output-on-failure)
endif ()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/zhaowx_admin/imageinfo.git
git@gitee.com:zhaowx_admin/imageinfo.git
zhaowx_admin
imageinfo
imageinfo
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385