Browse Source

build: apply `CMP0077` policy

master
Dnomd343 8 months ago
parent
commit
b07b0fdcd0
  1. 9
      CMakeLists.txt

9
CMakeLists.txt

@ -1,6 +1,10 @@
cmake_minimum_required(VERSION 3.12) cmake_minimum_required(VERSION 3.10)
project(md5sum LANGUAGES CXX) project(md5sum LANGUAGES CXX)
if ("${CMAKE_VERSION}" VERSION_GREATER_EQUAL "3.13")
cmake_policy(SET CMP0077 NEW)
endif()
# ------------------------------------------------------------------------------------ # # ------------------------------------------------------------------------------------ #
option(MD5_BUILD_DEMO "Build md5 demo binary." OFF) option(MD5_BUILD_DEMO "Build md5 demo binary." OFF)
@ -49,7 +53,8 @@ endif()
set(MD5_COMPILE_OPTIONS -fno-rtti -fno-exceptions) set(MD5_COMPILE_OPTIONS -fno-rtti -fno-exceptions)
target_compile_options(md5sum PRIVATE ${MD5_COMPILE_OPTIONS}) target_compile_options(md5sum PRIVATE ${MD5_COMPILE_OPTIONS})
target_include_directories(md5sum PUBLIC src/) target_include_directories(md5sum PUBLIC src/)
add_library(md5sum::md5sum ALIAS md5sum)
add_library(md5sum::md5 ALIAS md5sum)
# ------------------------------------------------------------------------------------ # # ------------------------------------------------------------------------------------ #

Loading…
Cancel
Save