Skip to content

Commit

Permalink
Fix C++ standard error during gtest compilation
Browse files Browse the repository at this point in the history
Signed-off-by: Deepthi C Shetty <[email protected]>
  • Loading branch information
dshett549 committed Dec 13, 2024
1 parent 2c3e5e8 commit b009256
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
11 changes: 0 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,6 @@ enable_testing()

find_package(PkgConfig REQUIRED)

if (CMAKE_VERSION VERSION_LESS "3.1")
message("CMAKE ${CMAKE_CXX_COMPILER_ID}")
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set (CMAKE_CXX_FLAGS "-std=gnu++11 ${CMAKE_CXX_FLAGS}")
set (CMAKE_C_FLAGS "-std=c11 ${CMAKE_C_FLAGS}")
endif ()
else ()
set (CMAKE_CXX_STANDARD 11)
set (CMAKE_C_STANDARD 11)
endif ()

set(CMAKE_C_FLAGS_DEBUG "-fPIC -Wall -Werror -Wextra -Wno-type-limits -fno-inline ${CMAKE_C_FLAGS_DEBUG} -DRBUS_ALWAYS_ON ")
set(CMAKE_C_FLAGS_RELEASE "-fPIC -Wall -Werror -Wextra ${CMAKE_C_FLAGS_RELEASE} -DRBUS_ALWAYS_ON ")

Expand Down
2 changes: 1 addition & 1 deletion unittests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if (NOT GTEST_INCLUDE_DIR)
ExternalProject_Add(
gtest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG release-1.12.0
GIT_TAG v1.15.2
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/gtest
INSTALL_COMMAND "")

Expand Down

0 comments on commit b009256

Please sign in to comment.