Skip to content

Commit

Permalink
Treat warning as error
Browse files Browse the repository at this point in the history
  • Loading branch information
bansan85 committed Jun 6, 2023
1 parent cf8e8e4 commit 51e7e99
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
6 changes: 5 additions & 1 deletion extern/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
cmake_minimum_required(VERSION 3.21)
cmake_minimum_required(VERSION 3.24)

project(Extern)

option(BUILD_SHARED_LIBS "Build using shared libraries" OFF)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_COMPILE_WARNING_AS_ERROR 1)

find_package(library REQUIRED)
find_package(library2 REQUIRED)
find_package(library3 REQUIRED)
Expand Down
3 changes: 2 additions & 1 deletion library/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.23)
cmake_minimum_required(VERSION 3.24)

# Configuration of the project needs to set VERSION to generate .cmake files and
# to use find_package.
Expand All @@ -11,6 +11,7 @@ set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
set(CMAKE_COMPILE_WARNING_AS_ERROR 1)

# You need to explicitly set BUILD_SHARED_LIBS option to enable static / shared
# library. But don't customize variable name.
Expand Down
3 changes: 2 additions & 1 deletion library2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.23)
cmake_minimum_required(VERSION 3.24)

project(
library2
Expand All @@ -9,6 +9,7 @@ set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
set(CMAKE_COMPILE_WARNING_AS_ERROR 1)

option(BUILD_SHARED_LIBS "Build using shared libraries" OFF)

Expand Down
3 changes: 2 additions & 1 deletion library3/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.23)
cmake_minimum_required(VERSION 3.24)

project(
library3
Expand All @@ -9,6 +9,7 @@ set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
set(CMAKE_COMPILE_WARNING_AS_ERROR 1)

option(BUILD_SHARED_LIBS "Build using shared libraries" OFF)

Expand Down
3 changes: 2 additions & 1 deletion library4/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.23)
cmake_minimum_required(VERSION 3.24)

# Configuration of the project needs to set VERSION to generate .cmake files and
# to use find_package.
Expand All @@ -11,6 +11,7 @@ set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
set(CMAKE_COMPILE_WARNING_AS_ERROR 1)

# You need to explicitly set BUILD_SHARED_LIBS option to enable static / shared
# library. But don't customize variable name.
Expand Down

0 comments on commit 51e7e99

Please sign in to comment.