diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index 087dd2198e..d7014a14e4 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -25,7 +25,7 @@ jobs: key: ubuntu-22-${{ matrix.cmake_build_type }}-${{ matrix.compiler.cc }}-${{matrix.compiler.cxx}} - run: ./update_glslang_sources.py - name: Configure - run: cmake -S . -B build -D CMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} -DBUILD_WERROR=ON -D GLSLANG_TESTS=ON + run: cmake -S . -B build -D CMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} -DGLSLANG_BUILD_WERROR=ON -D GLSLANG_TESTS=ON env: CC: ${{matrix.compiler.cc}} CXX: ${{matrix.compiler.cxx}} @@ -61,7 +61,7 @@ jobs: key: ubuntu-22-${{ matrix.cmake_build_type }}-${{ matrix.compiler.cc }}-${{matrix.compiler.cxx}} - run: ./update_glslang_sources.py - name: Configure - run: cmake -S . -B build -D CMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} -DBUILD_WERROR=ON -D GLSLANG_TESTS=ON -DBUILD_SHARED_LIBS=ON + run: cmake -S . -B build -D CMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} -DGLSLANG_BUILD_WERROR=ON -D GLSLANG_TESTS=ON -DBUILD_SHARED_LIBS=ON env: CC: ${{matrix.compiler.cc}} CXX: ${{matrix.compiler.cxx}} @@ -163,7 +163,7 @@ jobs: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: lukka/get-cmake@57c20a23a6cac5b90f31864439996e5b206df9dc # v4.0.1 - run: ./update_glslang_sources.py - - run: cmake -S . -B build -D CMAKE_BUILD_TYPE=${{matrix.cmake_build_type}} -G Ninja -DBUILD_WERROR=ON -D GLSLANG_TESTS=ON + - run: cmake -S . -B build -D CMAKE_BUILD_TYPE=${{matrix.cmake_build_type}} -G Ninja -DGLSLANG_BUILD_WERROR=ON -D GLSLANG_TESTS=ON env: CC: ${{matrix.compiler.cc}} CXX: ${{matrix.compiler.cxx}} @@ -187,7 +187,7 @@ jobs: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: lukka/get-cmake@57c20a23a6cac5b90f31864439996e5b206df9dc # v4.0.1 - run: ./update_glslang_sources.py - - run: cmake -S . -B build -D CMAKE_BUILD_TYPE=${{matrix.cmake_build_type}} -G Ninja -DBUILD_WERROR=ON -D GLSLANG_TESTS=ON -DBUILD_SHARED_LIBS=ON + - run: cmake -S . -B build -D CMAKE_BUILD_TYPE=${{matrix.cmake_build_type}} -G Ninja -DGLSLANG_BUILD_WERROR=ON -D GLSLANG_TESTS=ON -DBUILD_SHARED_LIBS=ON env: CC: ${{matrix.compiler.cc}} CXX: ${{matrix.compiler.cxx}} @@ -214,7 +214,7 @@ jobs: - run: python update_glslang_sources.py - name: Build run: | - cmake -S. -Bbuild -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX="$PWD/build/install" -DBUILD_WERROR=ON -D GLSLANG_TESTS=ON + cmake -S. -Bbuild -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX="$PWD/build/install" -DGLSLANG_BUILD_WERROR=ON -D GLSLANG_TESTS=ON cmake --build build --config ${{matrix.cmake_build_type}} --target install - name: Test find_package support run: | @@ -238,7 +238,7 @@ jobs: - run: python update_glslang_sources.py - name: Build run: | - cmake -S. -Bbuild -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX="$PWD/build/install" -DBUILD_WERROR=ON -D GLSLANG_TESTS=ON -DBUILD_SHARED_LIBS=ON + cmake -S. -Bbuild -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX="$PWD/build/install" -DGLSLANG_BUILD_WERROR=ON -D GLSLANG_TESTS=ON -DBUILD_SHARED_LIBS=ON cmake --build build --config ${{matrix.cmake_build_type}} --target install - name: Test find_package support run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e78c0b59f..5a3743b419 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,8 +46,8 @@ include(CMakePackageConfigHelpers) include(CMakeDependentOption) option(BUILD_SHARED_LIBS "Build Shared Libraries") -option(BUILD_EXTERNAL "Build external dependencies in /External" ON) -option(BUILD_WERROR "Enable warnings as errors (default is OFF)" OFF) +option(GLSLANG_BUILD_EXTERNAL "Build external dependencies in /External" ON) +option(GLSLANG_BUILD_WERROR "Enable warnings as errors (default is OFF)" OFF) set(LIB_TYPE STATIC) @@ -187,7 +187,7 @@ elseif(MSVC) endif() # NOTE we could potentially replace this logic with COMPILE_WARNING_AS_ERROR if cmake minimum is bumped to >= 3.24 -if (BUILD_WERROR) +if (GLSLANG_BUILD_WERROR) if (NOT MSVC) add_compile_options(-Werror) else() @@ -274,7 +274,7 @@ function(glslang_pch target pch) endif() endfunction() -if(BUILD_EXTERNAL AND IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/External) +if(GLSLANG_BUILD_EXTERNAL AND IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/External) # We depend on these for later projects, so they should come first. add_subdirectory(External) endif()