Skip to content

Commit

Permalink
Fixed issue that occurs when using googlemock with gcc 6.
Browse files Browse the repository at this point in the history
- See google/googletest#705

Signed-off-by: Christopher M. Cantalupo
  • Loading branch information
cmcantalupo committed Jul 22, 2016
1 parent 09a8b41 commit bc1ba0b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions test/Makefile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ test_geopm_test_LDADD = libgtest.a \
# end

test_geopm_test_CPPFLAGS = $(AM_CPPFLAGS) -Iplugin
test_geopm_test_CFLAGS = $(AM_CFLAGS) -fno-delete-null-pointer-checks
test_geopm_test_CXXFLAGS = $(AM_CXXFLAGS) -fno-delete-null-pointer-checks
if ENABLE_OPENMP
test_geopm_static_modes_test_SOURCES = test/geopm_static_modes_test.cpp
test_geopm_static_modes_test_LDADD = libgeopmpolicy.la
Expand All @@ -202,8 +204,8 @@ if ENABLE_MPI
# end

test_geopm_mpi_test_LDFLAGS = $(AM_LDFLAGS) $(MPI_CXXLDFLAGS)
test_geopm_mpi_test_CFLAGS = $(AM_CFLAGS) $(MPI_CFLAGS)
test_geopm_mpi_test_CXXFLAGS= $(AM_CXXFLAGS) $(MPI_CXXFLAGS)
test_geopm_mpi_test_CFLAGS = $(AM_CFLAGS) $(MPI_CFLAGS) -fno-delete-null-pointer-checks
test_geopm_mpi_test_CXXFLAGS= $(AM_CXXFLAGS) $(MPI_CXXFLAGS) -fno-delete-null-pointer-checks
endif

# Target for building test programs.
Expand Down
4 changes: 2 additions & 2 deletions test/googletest.mk
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ libgmock.a: $(googlemock)/VERSION
echo "Error: Failure to extract or download gmock archive" 2>&1; \
exit -1; \
fi
$(CXX) $(CXXFLAGS) -isystem $(googlemock)/include -I$(googlemock) -isystem $(googletest)/include -I$(googletest) -pthread \
$(CXX) $(CXXFLAGS) -isystem $(googlemock)/include -I$(googlemock) -isystem $(googletest)/include -I$(googletest) -pthread -fno-delete-null-pointer-checks \
-c $(googlemock)/src/gmock-all.cc
ar -rv libgmock.a gmock-all.o

Expand All @@ -93,7 +93,7 @@ libgtest.a: $(googlemock)/VERSION
echo "Error: Failure to extract or download gmock archive" 2>&1; \
exit -1; \
fi
$(CXX) $(CXXFLAGS) -isystem $(googletest)/include -I$(googletest) -pthread \
$(CXX) $(CXXFLAGS) -isystem $(googletest)/include -I$(googletest) -pthread -fno-delete-null-pointer-checks \
-c $(googletest)/src/gtest-all.cc
ar -rv libgtest.a gtest-all.o

Expand Down

0 comments on commit bc1ba0b

Please sign in to comment.