Skip to content

Commit

Permalink
Merge pull request #38 from rcsoccersim/fix/cmake_compile_options
Browse files Browse the repository at this point in the history
Replace CMAKE_CXX_FLAGS variable with target_compile_options
  • Loading branch information
hidehisaakiyama authored Apr 9, 2022
2 parents f7a61e9 + adcc887 commit f7067b6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
endif()
set(CMAKE_CXX_FLAGS "-W -Wall")

include(GNUInstallDirs)

Expand Down
5 changes: 5 additions & 0 deletions rcss/rcg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ target_include_directories(rcssrcg
${PROJECT_BINARY_DIR}
)

target_compile_options(rcssrcg
PRIVATE
-W -Wall
)


set_target_properties(rcssrcg PROPERTIES
VERSION 17.0.0
Expand Down
5 changes: 5 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ target_compile_definitions(rcssmonitor
HAVE_CONFIG_H
)

target_compile_options(rcssmonitor
PRIVATE
-W -Wall
)

set_target_properties(rcssmonitor
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}
Expand Down

0 comments on commit f7067b6

Please sign in to comment.