-bind plugin for msvc,-build_system/cmake.py some back/forward slash replacement, removed -j when on windows-added a target package to manage 32 vs 64 bit builds on windows
cd rez_src
python setup.py install
rez-bind os
rez-bind arch
rez-bind platform
rez-bind target
rez-bind python
rez-bind msvc
rez-env msvc-10 -- cl.exe
Microsoft (R) C/C++ Optimizing Compiler Version 16.00.40219.01 for x64
...
rez-env target-AMD32 msvc-10 -- cl.exe
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86--
You received this message because you are subscribed to the Google Groups "rez-config" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rez-config+...@googlegroups.com.
To post to this group, send email to rez-c...@googlegroups.com.
Visit this group at http://groups.google.com/group/rez-config.
For more options, visit https://groups.google.com/d/optout.
/cholofermes@HG $ mkdir packages
/cholofermes@HG $ rez-bind -i "C:/packages" oscreated package 'os-windows-6.2.9200' in C:/packages/cholofermes@HG $ rez-bind -i "C:/packages" archcreated package 'arch-AMD64' in C:/packages/cholofermes@HG $ rez-bind -i "C:/packages" platformcreated package 'platform-windows' in C:/packages/cholofermes@HG $ rez-bind -i "C:/packages" targetcreated package 'target-['AMD64', 'AMD32']' in C:/packages/cholofermes@HG $ rez-bind -i "C:/packages" pythoncreated package 'python-2.7.10' in C:/packages/cholofermes@HG $ rez-bind -i "C:/packages" cmakecreated package 'cmake-3.3.0' in C:/packages/cholofermes@HG $ rez-bind -i "C:/packages" msvccan't find msvc root, use --root and pass the directory to find vcvarsall.bat/cholofermes@HG $ rez-bind -i "C:/packages" msvc --root "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC"created package 'msvc-['14.0']' in C:/packages
holofermes@HG $ tree packages/packages/|-- arch| `-- AMD64| `-- package.py|-- cmake| `-- 3.3.0| |-- package.py| `-- platform-windows| `-- arch-AMD64| `-- os-windows-6.2.9200| `-- bin| `-- cmake|-- msvc| `-- 14.0| |-- package.py| `-- platform-windows| `-- arch-AMD64| `-- os-windows-6.2.9200| |-- target-AMD32| | `-- bin| | `-- setupmsvc.bat| `-- target-AMD64| `-- bin| `-- setupmsvc.bat|-- os| `-- windows-6.2.9200| `-- package.py|-- platform| `-- windows| `-- package.py|-- python| `-- 2.7.10| |-- package.py| `-- platform-windows| `-- arch-AMD64| `-- os-windows-6.2.9200| `-- bin| `-- python`-- target |-- AMD32 | `-- package.py `-- AMD64 `-- package.py
30 directories, 12 filesholofermes@HG $ rez-bind -i "C:\packages" msvccreated package 'msvc-['10.0', '12.0', '11.0', '14.0']' in C:\packages
/cholofermes@HG $ tree packages/msvc/packages/msvc/
...
...
36 directories, 16 files
holofermes@HG $ rez-env --path "C:/packages" msvc -c "rez context && cl.exe"resolved by holofermes@hg, on Mon Nov 16 21:53:19 2015, using Rez v2.0.rc1.28
requested packages:msvc~platform==windows (implicit)~arch==AMD64 (implicit)~os==windows-6.2.9200 (implicit)
resolved packages:arch-AMD64 C:\packages\arch\AMD64msvc-14.0 C:\packages\msvc\14.0\platform-windows\arch-AMD64\os-windows-6.2.9200\target-AMD64os-windows-6.2.9200 C:\packages\os\windows-6.2.9200platform-windows C:\packages\platform\windowstarget-AMD64 C:\packages\target\AMD64Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23026 for x64Copyright (C) Microsoft Corporation. All rights reserved.holofermes@HG $ rez-env --path "C:/packages" target-AMD86 msvc -c "rez context && cl.exe"resolved by holofermes@hg, on Mon Nov 16 22:00:03 2015, using Rez v2.0.rc1.28
requested packages:target-AMD86msvc~platform==windows (implicit)~arch==AMD64 (implicit)~os==windows-6.2.9200 (implicit)
resolved packages:arch-AMD64 C:\packages\arch\AMD64msvc-14.0 C:\packages\msvc\14.0\platform-windows\arch-AMD64\os-windows-6.2.9200\target-AMD86os-windows-6.2.9200 C:\packages\os\windows-6.2.9200platform-windows C:\packages\platform\windowstarget-AMD86 C:\packages\target\AMD86Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23026 for x86Copyright (C) Microsoft Corporation. All rights reserved.
181 if not platform_.name == 'windows':
182 if not any(x.startswith("-j") for x in (self.child_build_args or [])):
... n = variant.config.build_thread_count or cpu_count()
... cmd.append("-j%d" % n)
There is also a change that will install a bunch of .bat files on windows, because this is the only way I can get rez to work - still don't know it works for everybody else :(
--
In this case, the -j argument is child build process specific (make), not platform. Therefore, the conditional should (I think) be based on whether the child build process is make, and not the platform.
When I install rez on windows, the executables in the Scripts/rez folder are all .exe files. .exe is then set as part of the list in the PATHEXT variable. I also then make sure that Scripts/rez (and not the Scripts folder) is in PATH. I believe this combination is what allows us to run the executables without .bat files.
The fork you link to includes updates to the CMake plugin to call cmake.win.bat (instead of just cmake) - is this file included by the CMake install on windows or part of the rez-bind step? This should be (and I think in the current HEAD of rez is) configurable - you can see he re that the CMake executable is coming from the config file. This would keep it more easily compatible across facilities using rez (we don't use rez-bind for example and so presumably don't have cmake.win.bat, so if your branch is merged it would cause a problem for us).
--
You received this message because you are subscribed to a topic in the Google Groups "rez-config" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rez-config/pAQKq3sTpz0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rez-config+...@googlegroups.com.
C:\Users\XXXX\Documents\Visual Studio 2015\Projects>cl.exe hello_world.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23026 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
hello_world.c
Microsoft (R) Incremental Linker Version 14.00.23026.0
Copyright (C) Microsoft Corporation. All rights reserved.
/out:hello_world.exe
hello_world.objC:\Users\XXXX\Documents\Visual Studio 2015\Projects>cmake CMakeLists.txt
-- Building for: Visual Studio 14 2015
-- The C compiler identification is MSVC 19.0.23026.0
-- The CXX compiler identification is MSVC 19.0.23026.0
-- Check for working C compiler using: Visual Studio 14 2015
-- Check for working C compiler using: Visual Studio 14 2015 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 14 2015
-- Check for working CXX compiler using: Visual Studio 14 2015 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/XXXX/Documents/Visual Studio 2015/Projects
Determining if the C compiler works failed with the following output:
Change Dir: C:/Users/XXXX/code/platform/windows/build/CMakeFiles/CMakeTmp
Run Build Command:"nmake" "/NOLOGO" "cmTC_d0f6f\fast"
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f CMakeFiles\cmTC_d0f6f.dir\build.make /nologo -L CMakeFiles\cmTC_d0f6f.dir\build
Building C object CMakeFiles/cmTC_d0f6f.dir/testCCompiler.c.obj
C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe @C:\Users\LIPPS004\AppData\Local\Temp\nmE18.tmp
testCCompiler.c
Linking C executable cmTC_d0f6f.exe
"c:\Program Files (x86)\CMake\bin\cmake.exe" -E vs_link_exe C:\PROGRA~2\MICROS~1.0\VC\bin\link.exe /nologo @CMakeFiles\cmTC_d0f6f.dir\objects1.rsp @C:\Users\XXXX\AppData\Local\Temp\nmEB5.tmp
The parameter is incorrectLINK : fatal error LNK1104: cannot open file 'cmTC_d0f6f.exe.embed.manifest.res'
LINK Pass 1 failed. with 1104
NMAKE : fatal error U1077: '"c:\Program Files (x86)\CMake\bin\cmake.exe"' : return code '0xffffffff'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
C:\Users\XXXX\code\platform\windows>rez-env msvc -c "rez context && cl.exe"
resolved by XXXX, on Thu Nov 19 23:38:46 2015, using Rez v2.0.rc1.35
requested packages:
msvc
~platform==windows (implicit)
~arch==AMD64 (implicit)
~os==windows-6.1.7601.SP1 (implicit)
resolved packages:
arch-AMD64 XXXX\packages\versioned\init\arch\AMD64
msvc-14.0 C:\Users\XXXX\packages\msvc\14.0\platform-windows\arch-AMD64\os-windows-6.1.7601.SP1\target-AMD86 (local)
os-windows-6.1.7601.SP1 XXXX\packages\versioned\init\os\windows-6.1.7601.SP1
platform-windows XXXX\packages\versioned\init\platform\windows
target-AMD86 C:\Users\XXXX\packages\target\AMD86 (local)
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23026 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
usage: cl [ option... ] filename... [ /link linkoption... ]
C:\Users\XXXX\code\platform\windows>rez-env msvc -- cl.exe "c:\Users\XXXX\Documents\Visual Studio 2015\Projects\hello_world.c"
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23026 for x86
To unsubscribe from this group and all its topics, send an email to rez-config+unsubscribe@googlegroups.com.