On 17.04.2015 13:09, Sylvain Doremus wrote:
I have a strange output, related to the minimal CMakeLists.txt that I've
provided with this email.
My CMake version is 3.2.1, on Windows Seven SP1, the tested generators are
Visual Studio 10 2010 and Visual Studio 10 2010 Win64.
Here is the output I've got:
TestFolder/type
TestFolder
TestFolder/type
Configuring done
Is it normal? Or is it a bug?If it is normal, can someone explain me why it is?
It is expected if "type" itself is a variable (set by some module
evaluated by project()).
e.g. given:
set(TEST_FOLDER type)
The following if():
if(${TEST_FOLDER} STREQUAL "")
After expansion:
if(test STREQUAL "")
If test is a variable set to "" this becomes equivalent to:
if("" STREQUAL "")
If test is not defined as a variable this is instead equivalent to:
if("test" STREQUAL "")
Quoting prevents cmake from dereferencing variables like this if CMP0054
[1] is set to NEW.
CMP0054 is set to NEW for you since you require a cmake version >= 3.1.
Nils
[1] http://www.cmake.org/cmake/help/v3.2/policy/CMP0054.html
--
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