diff --git a/.github/workflows/gnulinux.yml b/.github/workflows/gnulinux.yml index 734e02dd4a..3c4ff916c5 100644 --- a/.github/workflows/gnulinux.yml +++ b/.github/workflows/gnulinux.yml @@ -157,7 +157,7 @@ jobs: - name: Configure build env: BUILD_TYPE: ${{ matrix.build_type }} - ARCH: ${{ matrix.arch == 32 && '-DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32' || '' }} + ARCH: ${{ matrix.arch == 32 && '-m32' || '' }} MAKE_DOCS: ${{ matrix.documentation }} GLBINDING: ${{ matrix.glbinding }} TESTS: ${{ matrix.os == 'ubuntu-20.04' }} @@ -166,10 +166,14 @@ jobs: $CXX --version mkdir "build" cd "build" + + # FIXME I'm not sure what's going on but for some reason we need to + # add the CXX_STANDARD flags manually cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE $ARCH \ -DWARNINGS=ON -DWERROR=ON \ -DCMAKE_INSTALL_MESSAGE=NEVER -DCMAKE_INSTALL_PREFIX=/usr \ - -DBUILD_DOCUMENTATION=$MAKE_DOCS -DENABLE_DISCORD=ON + -DBUILD_DOCUMENTATION=$MAKE_DOCS -DENABLE_DISCORD=ON \ + -DCMAKE_CXX_FLAGS="$ARCH -std=c++17" -DCMAKE_C_FLAGS="$ARCH" - name: Build and install working-directory: build diff --git a/CMakeLists.txt b/CMakeLists.txt index 39167a4a8c..00f2a1703d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,7 +46,6 @@ set(CMAKE_CXX_EXTENSIONS OFF) # Stop CMake from whining about 3.5 or future versions that other FindXXXXX.cmake files (seen from vcpkg) use set(CMAKE_WARN_DEPRECATED OFF CACHE BOOL "" FORCE) -set_target_properties if(${PLATFORM} MATCHES "arm64") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D_ARM64_ /DMY_CPU_LE") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D_ARM64_ /DMY_CPU_LE")