Skip to content

Commit

Permalink
CMakeLists.txt: Disable CSharp bindings and Examples in the default b…
Browse files Browse the repository at this point in the history
…uild

configuration. This improves the build time.

Signed-off-by: Alexandra Trifan <Alexandra.Trifan@analog.com>
  • Loading branch information
AlexandraTrifan committed Oct 26, 2020
1 parent ad00c40 commit 44f9239
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions CI/appveyor/build_appveyor_msvc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ __build_libm2k() {
-DENABLE_TOOLS=ON \
-DENABLE_LOG=ON \
-DPython_EXECUTABLE="$PY_PATH/python.exe" \
-DBUILD_EXAMPLES=ON \
-DENABLE_CSHARP=ON \
..
cmake --build . --config Release

Expand Down
4 changes: 2 additions & 2 deletions CI/travis/make_darwin
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
if [ "x${COVERITY_SCAN_PROJECT_NAME}" != "x" ] ; then exit 0; fi

cd $TRAVIS_BUILD_DIR/build
cmake -DOSX_PACKAGE=ON -DENABLE_TOOLS=ON -DENABLE_PYTHON=ON -DENABLE_CSHARP=ON -DENABLE_LOG=ON ..
cmake -DOSX_PACKAGE=ON -DENABLE_TOOLS=ON -DENABLE_PYTHON=ON -DENABLE_CSHARP=ON -DENABLE_LOG=ON -DBUILD_EXAMPLES=ON ..
make
ls

python3 setup.py sdist bdist_wheel
ls dist

cd $TRAVIS_BUILD_DIR/build_tar
cmake -DOSX_PACKAGE=OFF -DENABLE_PACKAGING=ON -DENABLE_PYTHON=ON -DENABLE_CSHARP=ON -DENABLE_TOOLS=ON -DENABLE_LOG=ON ..
cmake -DOSX_PACKAGE=OFF -DENABLE_PACKAGING=ON -DENABLE_PYTHON=ON -DENABLE_CSHARP=ON -DENABLE_TOOLS=ON -DENABLE_LOG=ON -DBUILD_EXAMPLES=ON ..
make && make package
ls
6 changes: 3 additions & 3 deletions CI/travis/make_linux
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ handle_default() {
cd build

#create deb for bindings
cmake -DENABLE_PYTHON=ON -DENABLE_TOOLS=ON -DENABLE_CSHARP=OFF -DENABLE_LOG=ON .. && make
cmake -DENABLE_PYTHON=ON -DENABLE_TOOLS=ON -DENABLE_CSHARP=OFF -DENABLE_LOG=ON -DBUILD_EXAMPLES=ON .. && make
sudo python3 setup.py --command-packages=stdeb.command sdist_dsc
cd "$(find . -type d -name "debian" | head -n 1)"
sudo env DEB_BUILD_OPTIONS=nocheck debuild -us -uc
Expand All @@ -19,15 +19,15 @@ handle_default() {
sudo rm *.tar.gz

#create simple .deb without Python bindings
cmake -DENABLE_PACKAGING=ON -DDEB_DETECT_DEPENDENCIES=ON -DENABLE_PYTHON=OFF -DENABLE_CSHARP=ON -DENABLE_TOOLS=ON -DENABLE_LOG=ON -DCMAKE_INSTALL_PREFIX=/usr ..
cmake -DENABLE_PACKAGING=ON -DDEB_DETECT_DEPENDENCIES=ON -DENABLE_PYTHON=OFF -DENABLE_CSHARP=ON -DENABLE_TOOLS=ON -DENABLE_LOG=ON -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_EXAMPLES=ON ..
make && make package
ls
}

handle_centos() {
mkdir -p build
cd build
cmake -DENABLE_PACKAGING=ON -DENABLE_PYTHON=OFF -DENABLE_CSHARP=ON -DENABLE_TOOLS=ON -DENABLE_LOG=ON -DCMAKE_INSTALL_PREFIX=/usr ..
cmake -DENABLE_PACKAGING=ON -DENABLE_PYTHON=OFF -DENABLE_CSHARP=ON -DENABLE_TOOLS=ON -DENABLE_LOG=ON -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_EXAMPLES=ON ..
make && make package
cd ..
}
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libraries")

# generate docs by default
option(ENABLE_DOC "Generate documentation with Doxygen" OFF)
option(BUILD_EXAMPLES "Build the default examples" ON)
option(BUILD_EXAMPLES "Build the default examples" OFF)
option(ENABLE_LOG "Build with logging support" OFF)
option(ENABLE_EXCEPTIONS "Build with exception handling support" ON)
option(ENABLE_PYTHON "Build Python bindings" ON)
option(ENABLE_CSHARP "Build C# bindings" ON)
option(ENABLE_CSHARP "Build C# bindings" OFF)
option(ENABLE_TOOLS "Build the tools" OFF)
option(INSTALL_UDEV_RULES "Install udev rules for the M2K" ON)

Expand Down
4 changes: 2 additions & 2 deletions cmake/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ which will generate all the necessary recipes for building and installing. Usefu
| \<option\> | value | default | description |
| --------- | ----------- | ----------- | ----------- |
| ENABLE_DOC | on/off | off | Generate doc using Doxygen |
| BUILD_EXAMPLES | on/off | on | Build the default examples |
| BUILD_EXAMPLES | on/off | off | Build the default examples |
| ENABLE_LOG | on/off | off | Build libm2k with logging support |
| ENABLE_EXCEPTIONS | on/off | on | Build with exception handling support |
| ENABLE_PYTHON | on/off | on | Build the Python bindings |
| ENABLE_CSHARP | on/off | on | Build the C# bindings |
| ENABLE_CSHARP | on/off | off | Build the C# bindings |
| ENABLE_TOOLS | on/off | off | Build the tools |
| INSTALL_UDEV_RULES | on/off | on | Install udev rles for the M2K |
| CMAKE_PREFIX_PATH | \<path\> | Empty | Specifies a path which will be used by the FIND_XXX() commands |
Expand Down

0 comments on commit 44f9239

Please sign in to comment.