mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 16:46:47 +00:00
CMake: Set policies by version
This commit is contained in:
parent
7506243e1a
commit
de7b5767fb
|
@ -7,13 +7,12 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.9.4 FATAL_ERROR)
|
cmake_minimum_required(VERSION 3.9.4 FATAL_ERROR)
|
||||||
|
cmake_policy(VERSION 3.9...3.15)
|
||||||
|
|
||||||
# Project ######################################################################
|
# Project ######################################################################
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
|
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
|
||||||
include(FairMQLib)
|
include(FairMQLib)
|
||||||
|
|
||||||
set_fairmq_cmake_policies()
|
|
||||||
get_git_version()
|
get_git_version()
|
||||||
|
|
||||||
project(FairMQ VERSION ${PROJECT_VERSION} LANGUAGES CXX)
|
project(FairMQ VERSION ${PROJECT_VERSION} LANGUAGES CXX)
|
||||||
|
|
|
@ -29,25 +29,6 @@ if(NOT WIN32 AND NOT DISABLE_COLOR)
|
||||||
set(BWhite "${Esc}[1;37m")
|
set(BWhite "${Esc}[1;37m")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# set_fairmq_cmake_policies()
|
|
||||||
#
|
|
||||||
# Sets CMake policies.
|
|
||||||
macro(set_fairmq_cmake_policies)
|
|
||||||
# Find more details to each policy with cmake --help-policy CMPXXXX
|
|
||||||
foreach(policy
|
|
||||||
CMP0025 # Compiler id for Apple Clang is now AppleClang.
|
|
||||||
CMP0028 # Double colon in target name means ALIAS or IMPORTED target.
|
|
||||||
CMP0042 # MACOSX_RPATH is enabled by default.
|
|
||||||
CMP0048 # The ``project()`` command manages VERSION variables.
|
|
||||||
CMP0054 # Only interpret ``if()`` arguments as variables or keywords when unquoted.
|
|
||||||
)
|
|
||||||
if(POLICY ${policy})
|
|
||||||
cmake_policy(SET ${policy} NEW)
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
endmacro()
|
|
||||||
|
|
||||||
|
|
||||||
find_package(Git)
|
find_package(Git)
|
||||||
# get_git_version([DEFAULT_VERSION version] [DEFAULT_DATE date] [OUTVAR_PREFIX prefix])
|
# get_git_version([DEFAULT_VERSION version] [DEFAULT_DATE date] [OUTVAR_PREFIX prefix])
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue
Block a user