ci: Enable tests on MacOS GithubActions
authorCharles Giessen <charles@lunarg.com>
Fri, 1 Oct 2021 22:46:33 +0000 (16:46 -0600)
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>
Mon, 4 Oct 2021 18:02:49 +0000 (12:02 -0600)
Tests only get built if you enable them now, instead of when
googletest is in the external folder.

.github/workflows/build.yml
CMakeLists.txt

index e57d0c111b97696dfad02cef3b9381a4cfd07cbb..847b99f7379ec18a2714a41c951220200cb11167 100644 (file)
@@ -127,11 +127,8 @@ jobs:
               with:
                 python-version: '3.7'
 
-            - name: Get Google Test
-              run: git clone --branch release-1.10.0 https://github.com/google/googletest.git external/googletest
-
             - name: Generate build files
-              run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=${{matrix.config}} -DUPDATE_DEPS=ON
+              run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=${{matrix.config}} -DBUILD_TESTS=On -DUPDATE_DEPS=ON
 
             - name: Build the loader
               run: make -C build
index bd0236a63ff1d986973a9b9686785ef11e8c08ed..8144fe87d653eda827e5fd10bd3cfda0dad4f814 100644 (file)
@@ -258,6 +258,7 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
 
     if(APPLE)
         set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMMON_COMPILE_FLAGS}")
+               set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMMON_COMPILE_FLAGS} -std=c++11 -fno-rtti")
     #clang-cl on Windows
     elseif((CMAKE_C_COMPILER_ID MATCHES "Clang") AND (CMAKE_CXX_SIMULATE_ID MATCHES "MSVC"))
         set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Xclang -std=c99 ${COMMON_COMPILE_FLAGS}")