代码拉取完成,页面将自动刷新
cmake_minimum_required(VERSION 3.8.2)
project(Clara)
set(SOURCE_FILES src/main.cpp src/ClaraTests.cpp include/clara.hpp)
include_directories( include third_party )
add_executable(ClaraTests ${SOURCE_FILES})
if(USE_CPP14)
set_property(TARGET ClaraTests PROPERTY CXX_STANDARD 14)
message(STATUS "Enabled C++14")
elseif(USE_CPP17)
set_property(TARGET ClaraTests PROPERTY CXX_STANDARD 17)
message(STATUS "Enabled C++17")
else(USE_CPP11)
set_property(TARGET ClaraTests PROPERTY CXX_STANDARD 11)
message(STATUS "Enabled C++11")
endif()
set_property(TARGET ClaraTests PROPERTY CXX_STANDARD_REQUIRED ON)
set_property(TARGET ClaraTests PROPERTY CXX_EXTENSIONS OFF)
if( CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang|GNU" )
target_compile_options( ClaraTests PRIVATE -Wall -Wextra -pedantic -Werror )
endif()
if( CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
target_compile_options( ClaraTests PRIVATE /W4 /WX )
endif()
if (ENABLE_COVERAGE)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/CMake")
find_package(codecov)
add_coverage(ClaraTests)
list(APPEND LCOV_REMOVE_PATTERNS "/usr/")
coverage_evaluate()
endif()
include(CTest)
add_test(NAME RunTests COMMAND $<TARGET_FILE:ClaraTests>)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。