-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e15096b
commit 4fcf698
Showing
6 changed files
with
178 additions
and
65 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,22 +1,28 @@ | ||
mkdir build | ||
cd build | ||
mkdir build_cxx | ||
cd build_cxx | ||
|
||
:: Set Python install dir to wrong directory to ensure Python files | ||
:: are not included in the libgz-msgs<major> package | ||
cmake ^ | ||
-G "Ninja" ^ | ||
-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ | ||
-DCMAKE_BUILD_TYPE=Release ^ | ||
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ | ||
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON ^ | ||
-DGZ_PYTHON_INSTALL_PATH=%SRC_DIR%\wrong_py_install ^ | ||
-DUSE_SYSTEM_PATHS_FOR_PYTHON_INSTALLATION:BOOL=ON ^ | ||
-DPython3_EXECUTABLE:PATH=%PYTHON% ^ | ||
-DPYTHON_EXECUTABLE:PATH=%PYTHON% ^ | ||
%SRC_DIR% | ||
if errorlevel 1 exit 1 | ||
|
||
:: Build. | ||
cmake --build . --config Release | ||
if errorlevel 1 exit 1 | ||
|
||
:: Install. | ||
:: Install | ||
cmake --build . --config Release --target install | ||
if errorlevel 1 exit 1 | ||
|
||
:: Test. | ||
ctest -C Release | ||
ctest -C Release -E "basic_TEST" | ||
if errorlevel 1 exit 1 |
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,28 @@ | ||
mkdir build_py | ||
cd build_py | ||
|
||
:: Set CMAKE_NSTALL_PREFIX to wrong directory to ensure C++ files | ||
:: are not included in the gz-msgs<major>-python package | ||
cmake ^ | ||
-G "Ninja" ^ | ||
-DCMAKE_INSTALL_PREFIX=%SRC_DIR%\wrong_cxx_install ^ | ||
-DCMAKE_BUILD_TYPE=Release ^ | ||
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON ^ | ||
-DGZ_PYTHON_INSTALL_PATH=%SP_DIR% ^ | ||
-DUSE_SYSTEM_PATHS_FOR_PYTHON_INSTALLATION:BOOL=ON ^ | ||
-DPython3_EXECUTABLE:PATH=%PYTHON% ^ | ||
-DPYTHON_EXECUTABLE:PATH=%PYTHON% ^ | ||
%SRC_DIR% | ||
if errorlevel 1 exit 1 | ||
|
||
:: Build. | ||
cmake --build . --config Release | ||
if errorlevel 1 exit 1 | ||
|
||
:: Install | ||
cmake --build . --config Release --target install | ||
if errorlevel 1 exit 1 | ||
|
||
:: Test. | ||
ctest -C Release -E "basic_TEST" | ||
if errorlevel 1 exit 1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/bin/sh | ||
|
||
if [[ "${target_platform}" == osx-* ]]; then | ||
# See https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk | ||
CXXFLAGS="${CXXFLAGS} -D_LIBCPP_DISABLE_AVAILABILITY" | ||
fi | ||
|
||
if [[ "$CONDA_BUILD_CROSS_COMPILATION" == 1 ]]; then | ||
( | ||
mkdir -p build-host | ||
pushd build-host | ||
|
||
export CC=$CC_FOR_BUILD | ||
export CXX=$CXX_FOR_BUILD | ||
export LDFLAGS=${LDFLAGS//$PREFIX/$BUILD_PREFIX} | ||
export PKG_CONFIG_PATH=${PKG_CONFIG_PATH//$PREFIX/$BUILD_PREFIX} | ||
|
||
# Unset them as we're ok with builds that are either slow or non-portable | ||
unset CFLAGS | ||
unset CXXFLAGS | ||
|
||
cmake -GNinja .. \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_PREFIX_PATH=$BUILD_PREFIX -DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX \ | ||
-DCMAKE_INSTALL_LIBDIR=lib \ | ||
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True | ||
cmake --build . --parallel ${CPU_COUNT} --config Release | ||
cmake --build . --parallel ${CPU_COUNT} --config Release --target install | ||
) | ||
fi | ||
|
||
mkdir build | ||
cd build | ||
|
||
if [[ "${CONDA_BUILD_CROSS_COMPILATION}" == "1" ]]; then | ||
export CMAKE_ARGS="${CMAKE_ARGS} -Dgz-msgs10_PYTHON_INTERPRETER=$BUILD_PREFIX/bin/python -Dgz-msgs10_PROTOC_EXECUTABLE=$BUILD_PREFIX/bin/protoc -Dgz-msgs10_PROTO_GENERATOR_PLUGIN=$BUILD_PREFIX/bin/gz-msgs10_protoc_plugin" | ||
fi | ||
|
||
# Set Python install dir to wrong directory to ensure Python files | ||
# are not included in the libgz-msgs<major> package | ||
cmake ${CMAKE_ARGS} -DBUILD_TESTING:BOOL=ON -GNinja .. \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP:BOOL=ON \ | ||
-DGZ_PYTHON_INSTALL_PATH=$SRC_DIR/wrong_py_install \ | ||
-DUSE_SYSTEM_PATHS_FOR_PYTHON_INSTALLATION:BOOL=ON \ | ||
-DPython3_EXECUTABLE:PATH=$PYTHON \ | ||
-DPYTHON_EXECUTABLE:PATH=$PYTHON \ | ||
-DPython3_INCLUDE_DIR:PATH=$PREFIX/include/`ls $PREFIX/include | grep "python\|pypy"` | ||
|
||
cmake --build . --config Release | ||
cmake --build . --config Release --target install | ||
|
||
export CTEST_OUTPUT_ON_FAILURE=1 | ||
if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" != "1" || "${CROSSCOMPILING_EMULATOR}" != "" ]]; then | ||
ctest -C Release -R "basic_TEST" | ||
fi |
This file was deleted.
Oops, something went wrong.
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