The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=14923
======================================================================
Reported By: skvadrik
Assigned To:
======================================================================
Project: CMake
Issue ID: 14923
Category: Modules
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2014-05-21 05:24 EDT
Last Modified: 2014-05-21 05:24 EDT
======================================================================
Summary: check_cxx_compiler_flag fails when variable name
contains "++"
Description:
The following call:
check_cxx_compiler_flag(-Weffc++ CXX_FLAG_-Weffc++)
Leads to the following error:
RegularExpression::compile(): Nested *?+.
RegularExpression::compile(): Error in compile.
CMake Error at /usr/share/cmake/Modules/CheckCXXSourceCompiles.cmake:30 (if):
if given arguments:
"LJS_CXX_FLAG_-Weffc++" "MATCHES" "^LJS_CXX_FLAG_-Weffc++\$"
Regular expression "^LJS_CXX_FLAG_-Weffc++$" cannot compile
Steps to Reproduce:
check_cxx_compiler_flag(-Weffc++ CXX_FLAG_-Weffc++)
Additional Information:
check_cxx_compiler_flag calls check_cxx_source_compiles. The latter tries to
interpret variable name as a regexp:
if("${VAR}" MATCHES "^${VAR}$")
which leads to an error for a variable name "CXX_FALG_-Weffc++" (and many other
variable names, which are generally accepted by cmake)
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2014-05-21 05:24 skvadrik New Issue
======================================================================
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers