Merge pull request #7805 from ethereum/cmake-cache-fix-on-windows

Cmake cache fix on windows
This commit is contained in:
Christian Parpart
2019-11-27 12:39:14 +01:00
committed by GitHub
+3 -1
View File
@@ -10,7 +10,9 @@ include(CheckCXXCompilerFlag)
#
function(eth_add_cxx_compiler_flag_if_supported FLAG)
# Remove leading - or / from the flag name.
string(REGEX REPLACE "^-|/" "" name ${FLAG})
string(REGEX REPLACE "^[-/]" "" name ${FLAG})
# Deletes any ':' because it's invalid variable names.
string(REGEX REPLACE ":" "" name ${name})
check_cxx_compiler_flag(${FLAG} ${name})
if(${name})
add_compile_options(${FLAG})