Closed mbanth closed 2 years ago
Running the SetEnv.bat script at a VS command prompt before attempting the cmake command allows the cmake command to complete successfully:
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools>cd "c:\Program Files (x86)\XMOS\XTC\15.1.4"
c:\Program Files (x86)\XMOS\XTC\15.1.4>SetEnv.bat
c:\Program Files (x86)\XMOS\XTC\15.1.4>cd c:\Users\michaelb\sandboxes\xscope_fileio\host
c:\Users\michaelb\sandboxes\xscope_fileio\host>cmake -G "NMake Makefiles" .
-- The C compiler identification is MSVC 19.25.28610.4
-- The CXX compiler identification is MSVC 19.25.28610.4
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/michaelb/sandboxes/xscope_fileio/host
I suspect that the problem lies in the environment variables each type of command prompt terminal creates/alters.
The attached file compares the PATH variable for a VS command terminal and an XTC command terminal. VS_XTC_Path_Comparison.xlsx
The pull requests associated with this issue have resolved the problem. Closing as fixed.
The README.rst file suggests using the
cmake -G "NMake Makefiles" .
command to generate build files for use on Windows. This command fails when run at an XTC command prompt. It fails in a different way when run at a VS command prompt.Both failure cases occur using cmake v3.22.5. I have not tried this command with another version of cmake.
I used commit ad7cfb6, the current HEAD of develop, of xscope_fileio as of to generate the results shown below.
When run from an XTC command prompt:
When run from a VS command prompt: