[cmake-developers] [CMake 0015164]: Relative Value for CMAKE_TOOLCHAIN_FILE Does Not Work Under PowerShell
Mantis Bug Tracker
mantis at public.kitware.com
Fri Sep 19 01:10:45 EDT 2014
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=15164
======================================================================
Reported By: Janne Rönkkö
Assigned To:
======================================================================
Project: CMake
Issue ID: 15164
Category: CMake
Reproducibility: always
Severity: major
Priority: normal
Status: new
======================================================================
Date Submitted: 2014-09-19 01:10 EDT
Last Modified: 2014-09-19 01:10 EDT
======================================================================
Summary: Relative Value for CMAKE_TOOLCHAIN_FILE Does Not
Work Under PowerShell
Description:
The toolchain file is not handled properly under PowerShell if the toolchain
file path is relative.
The issues (I have noticed so far):
- CMAKE_SYSTEM_NAME is not set properly
- There is warnings about include with empty file name (this seems to be the
reason that at least CMAKE_SYSTEM_NAME is not set correctly)
The issue is present at least in versions 3.0.0-3.0.2 (these are the version I
tested).
Steps to Reproduce:
In PowerShell:
unzip project.zip
cd project
mkdir build
cmake -DCMAKE_TOOLCHAIN_FILE=../../toolchain.cmake -G Ninja ..
Additional Information:
On PowerShell with relative path:
=================================
PS C:\Users\janne\project\build> cmake
-DCMAKE_TOOLCHAIN_FILE=../../toolchain.cmake -G Ninja ..
CMake Warning (dev) at build/CMakeFiles/3.0.2/CMakeSystem.cmake:6 (include):
include() given empty file name (ignored).
Call Stack (most recent call first):
CMakeLists.txt:3 (project)
This warning is for project developers. Use -Wno-dev to suppress it.
-- The C compiler identification is GNU 4.7.3
-- The CXX compiler identification is GNU 4.7.3
-- Check for working C compiler using: Ninja
CMake Warning (dev) at
C:/Users/janne/project/build/CMakeFiles/3.0.2/CMakeSystem.cmake:6 (include):
include() given empty file name (ignored).
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Check for working C compiler using: Ninja -- works
-- Detecting C compiler ABI info
CMake Warning (dev) at
C:/Users/janne/project/build/CMakeFiles/3.0.2/CMakeSystem.cmake:6 (include):
include() given empty file name (ignored).
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Ninja
CMake Warning (dev) at
C:/Users/janne/project/build/CMakeFiles/3.0.2/CMakeSystem.cmake:6 (include):
include() given empty file name (ignored).
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Check for working CXX compiler using: Ninja -- works
-- Detecting CXX compiler ABI info
CMake Warning (dev) at
C:/Users/janne/project/build/CMakeFiles/3.0.2/CMakeSystem.cmake:6 (include):
include() given empty file name (ignored).
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Detecting CXX compiler ABI info - done
CMake system name: Windows
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/janne/project/build
## Note the line "CMake system name: Windows"
On PowerShell with absolute path:
=================================
PS C:\Users\janne\project\build> cmake
-DCMAKE_TOOLCHAIN_FILE=C:/users/janne/toolchain.cmake -G Ninja ..
-- The C compiler identification is GNU 4.7.3
-- The CXX compiler identification is GNU 4.7.3
-- Check for working C compiler using: Ninja
-- Check for working C compiler using: Ninja -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Ninja
-- Check for working CXX compiler using: Ninja -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake system name: Linux
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/janne/project/build
On cmd.exe with relative path:
==============================
C:\Users\janne\project\build>cmake -DCMAKE_TOOLCHAIN_FILE=../../toolchain.cmake
-G Ninja ..
-- The C compiler identification is GNU 4.7.3
-- The CXX compiler identification is GNU 4.7.3
-- Check for working C compiler using: Ninja
-- Check for working C compiler using: Ninja -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Ninja
-- Check for working CXX compiler using: Ninja -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake system name: Linux
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/janne/project/build
On cmd.exe with absolute path:
==============================
C:\Users\janne\project\build>cmake
-DCMAKE_TOOLCHAIN_FILE=C:/users/janne/toolchain.cmake -G Ninja ..
-- The C compiler identification is GNU 4.7.3
-- The CXX compiler identification is GNU 4.7.3
-- Check for working C compiler using: Ninja
-- Check for working C compiler using: Ninja -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Ninja
-- Check for working CXX compiler using: Ninja -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake system name: Linux
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/janne/project/build
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2014-09-19 01:10 Janne Rönkkö New Issue
2014-09-19 01:10 Janne Rönkkö File Added: project.zip
======================================================================
More information about the cmake-developers
mailing list