diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 38c41aa..5584a02 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -20,7 +20,12 @@ jobs: run: sudo apt-get install libpcre3-dev libgtkmm-3.0-dev gettext - name: Create Build Environment - run: cmake -E make_directory ${{runner.workspace}}/build + run: >- + cmake -E make_directory + -DAPP_BUILD_EXAMPLES=ON + -DAPP_BUILD_TESTS=ON + -DAPP_COMPILER_ENABLE_WARNINGS=ON + ${{runner.workspace}}/build - name: Configure CMake # Use a bash shell so we can use the same syntax for environment variable diff --git a/CMakeLists.txt b/CMakeLists.txt index 77c95d8..d390146 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,8 +23,13 @@ include(src/build_config/compiler_options.cmake) set(CMAKE_SKIP_BUILD_RPATH TRUE) set(CMAKE_SKIP_INSTALL_RPATH TRUE) +# Write the binaries to project root (avoids conflicts with manifests, also it's more convenient this way) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}") -option(APP_BUILD_EXAMPLES "Build examples" ON) + +# User-controlled build options +option(APP_BUILD_EXAMPLES "Build examples" OFF) +option(APP_BUILD_TESTS "Build tests" OFF) configure_file(gsmartcontrol.in.spec gsmartcontrol.spec)