Skip to content

Commit 6eeb863

Browse files
authored
Elimenated clang compilation warnings "argument unused during compilation" #2001 (#2052)
1 parent dc17d47 commit 6eeb863

File tree

4 files changed

+20
-22
lines changed

4 files changed

+20
-22
lines changed

cmake/AddCpuOptions.cmake

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright 2006 Milan Digital Audio LLC
2+
# Copyright 2009-2024 GrandOrgue contributors (see AUTHORS)
3+
# License GPL-2.0 or later
4+
# (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).
5+
6+
include(${CMAKE_SOURCE_DIR}/cmake/AddCXXOption.cmake)
7+
8+
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "x86")
9+
add_cxx_option(-mmmx)
10+
add_cxx_option(-msse)
11+
add_cxx_option(-msse2)
12+
add_cxx_option(-msse3)
13+
endif()
14+
15+
add_cxx_option(-mstackrealign)
16+

src/grandorgue/CMakeLists.txt

+1-7
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,7 @@
55
include(${CMAKE_SOURCE_DIR}/cmake/AddLinkerOption.cmake)
66
include(${CMAKE_SOURCE_DIR}/cmake/CopyWxTranslations.cmake)
77
include(${CMAKE_SOURCE_DIR}/cmake/CopyDependencies.cmake)
8-
9-
add_option(-mmmx)
10-
add_option(-msse)
11-
add_option(-msse2)
12-
add_option(-msse3)
13-
14-
add_option(-mstackrealign)
8+
include(${CMAKE_SOURCE_DIR}/cmake/AddCpuOptions.cmake)
159

1610
find_package(wxWidgets REQUIRED html net adv core base)
1711
include(${wxWidgets_USE_FILE})

src/tests/CMakeLists.txt

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
add_option(-mmmx)
2-
add_option(-msse)
3-
add_option(-msse2)
4-
add_option(-msse3)
5-
6-
add_option(-mstackrealign)
7-
1+
include(${CMAKE_SOURCE_DIR}/cmake/AddCpuOptions.cmake)
82
include(UsewxWidgets)
93
include_directories(${CMAKE_BINARY_DIR}/src/core/go_defs.h ${CMAKE_SOURCE_DIR}/src/core)
104

src/tools/CMakeLists.txt

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
# Copyright 2006 Milan Digital Audio LLC
2-
# Copyright 2009-2023 GrandOrgue contributors (see AUTHORS)
2+
# Copyright 2009-2024 GrandOrgue contributors (see AUTHORS)
33
# License GPL-2.0 or later (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).
44

5-
add_option(-mmmx)
6-
add_option(-msse)
7-
add_option(-msse2)
8-
add_option(-msse3)
9-
10-
add_option(-mstackrealign)
11-
5+
include(${CMAKE_SOURCE_DIR}/cmake/AddCpuOptions.cmake)
126
include(UsewxWidgets)
137

148
include_directories(${CMAKE_BINARY_DIR}/src/core/go_defs.h ${CMAKE_SOURCE_DIR}/src/core)

0 commit comments

Comments
 (0)