Skip to content

Commit

Permalink
Don't force CMAKE_CXX_FLAGS changes when not top-level
Browse files Browse the repository at this point in the history
  • Loading branch information
jagerman committed Sep 9, 2024
1 parent 3b15fa8 commit 10a59e6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ if(CPR_ENABLE_CPPCHECK)
include(cmake/cppcheck.cmake)
endif()

if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
else()
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Werror")
endif()

Expand Down

0 comments on commit 10a59e6

Please sign in to comment.