On Tue, Nov 18, 2014 at 23:18:20 +0000, Fraser Hutchison wrote:
> -if(CMAKE_C_SIMULATE_ID STREQUAL "MSVC"
> - OR CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC"
> - OR CMAKE_Fortran_SIMULATE_ID STREQUAL "MSVC"
> - OR CMAKE_C_COMPILER_ID STREQUAL "MSVC"
> - OR CMAKE_CXX_COMPILER_ID STREQUAL "MSVC"
> +if(CMAKE_C_SIMULATE_ID STREQUAL MSVC
> + OR CMAKE_CXX_SIMULATE_ID STREQUAL MSVC
> + OR CMAKE_Fortran_SIMULATE_ID STREQUAL MSVC
> + OR CMAKE_C_COMPILER_ID STREQUAL MSVC
> + OR CMAKE_CXX_COMPILER_ID STREQUAL MSVC
I think you misinterpreted the warning message. It is saying that with
OLD behavior MSVC will be dereferenced (which is bad here because we
want to use it as a string) and with NEW behavior, MSVC is just a string
(and a change in behavior, hence the warning). Given:
CMAKE_CXX_SIMULATE_ID -> MSVC
MSVC -> 1
This now does:
"MSVC" STREQUAL "1"
In fact, this is what CMake will do with CMP0054 set to OLD *anyways*
and these are actual bugs (and always have been; the dequoting of the
left side was done by me in a massive sweep, but the right side issue
was missed). These should be changed to:
"x${var}" STREQUAL "xMSVC"
Though, an easier fix may be to push_scope() and set CMP0054 to NEW in
these files.
--Ben
--
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/mailman/listinfo/cmake-developers