-
Notifications
You must be signed in to change notification settings - Fork 337
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cmake build test and path normalization test for Windows
Signed-off-by: javrin <jawabiscuit@users.noreply.github.com>
- Loading branch information
1 parent
ac3ff37
commit d0958cd
Showing
5 changed files
with
85 additions
and
2 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
src/rez/data/tests/builds/packages/winning/9.6/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
cmake_minimum_required(VERSION 2.8) | ||
|
||
# On Linux defining a project name is usually not necessary for rez packages which simply use cmake | ||
# as a Makefile recipe generator, however to be cross-compatible with Windows we can define it to | ||
# get the same functionality. | ||
# | ||
# Here we are telling cmake this is not a compiled project by providing NONE for the second argument. | ||
# | ||
# The project function is only being used in this in case because we are on Windows and want to use | ||
# the gnu make utility provided by a `make` rez package or configuring a path to `make.exe` in rez config. | ||
# This bypasses having to use the default `nmake` on Windows which requires the Windows compiler and | ||
# linker and attempts to build a simple c++ executable during a build. | ||
# | ||
project($ENV{REZ_BUILD_PROJECT_NAME}, NONE) | ||
|
||
include(RezBuild) | ||
|
||
file(GLOB_RECURSE py_files "python/*.py") | ||
|
||
# Not using rez_install_python b/c we don't want to require python for this test package | ||
rez_install_files( | ||
${py_files} | ||
DESTINATION . | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name = "winning" | ||
version = "9.6" | ||
description = ( | ||
"Test cmake builds especially on Windows with Unix Makefiles generator. " | ||
"This is a handy workflow to have on Windows b/c it supports rez + cmake with " | ||
"minimal effort and w/o the overhead of Visual Studio. " | ||
"Note: Using cmake on Windows requires path normalization to be enabled. " | ||
) | ||
|
||
build_requires = [ | ||
# make and cmake need to be installed locally for this test to build and succeed | ||
] | ||
|
||
def commands(): | ||
env.PYTHONPATH.append("{root}/python") |
1 change: 1 addition & 0 deletions
1
src/rez/data/tests/builds/packages/winning/9.6/python/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# This file is intentionally left blank |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters