MHU-valantic 2022-05-23 18:08:35 +02:00 committed by bel2125
parent 6dc8388fe8
commit afea23abf3
3 changed files with 10 additions and 8 deletions

View File

@ -2,6 +2,7 @@
cmake_minimum_required (VERSION 3.3.0)
cmake_policy(VERSION 3.2.2)
cmake_policy(SET CMP0054 NEW)
cmake_policy(SET CMP0057 NEW)
# Set up the project
project (civetweb)

View File

@ -24,8 +24,9 @@ function(add_c_compiler_flag FLAG)
string(REPLACE "+" "X" SANITIZED_FLAG ${SANITIZED_FLAG})
string(REGEX REPLACE "[^A-Za-z_0-9]" "_" SANITIZED_FLAG ${SANITIZED_FLAG})
string(REGEX REPLACE "_+" "_" SANITIZED_FLAG ${SANITIZED_FLAG})
check_c_compiler_flag(${SANITIZED_FLAG} NO_DIAGNOSTICS_PRODUCED)
if(${NO_DIAGNOSTICS_PRODUCED})
check_c_compiler_flag("${FLAG}" ${SANITIZED_FLAG})
if(${${SANITIZED_FLAG}})
set(${SANITIZED_FLAG} ON PARENT_SCOPE )
set(VARIANT ${ARGV1})
if(ARGV1)
string(REGEX REPLACE "[^A-Za-z_0-9]" "_" VARIANT "${VARIANT}")

View File

@ -24,8 +24,8 @@ function(add_cxx_compiler_flag FLAG)
string(REPLACE "+" "X" SANITIZED_FLAG ${SANITIZED_FLAG})
string(REGEX REPLACE "[^A-Za-z_0-9]" "_" SANITIZED_FLAG ${SANITIZED_FLAG})
string(REGEX REPLACE "_+" "_" SANITIZED_FLAG ${SANITIZED_FLAG})
check_cxx_compiler_flag(${SANITIZED_FLAG} NO_DIAGNOSTICS_PRODUCED)
if(${NO_DIAGNOSTICS_PRODUCED})
check_cxx_compiler_flag( "${FLAG}" ${SANITIZED_FLAG} )
if(${${SANITIZED_FLAG}})
set(VARIANT ${ARGV1})
if(ARGV1)
string(REGEX REPLACE "[^A-Za-z_0-9]" "_" VARIANT "${VARIANT}")