Apply warnings to install test

Because the install test project can't access SFML CMake functions,
these warnings are only applied when building the install tests as
a part of SFML.
This commit is contained in:
Chris Thrasher 2022-10-26 16:42:44 -06:00
parent 8c6b578012
commit 4807c779a7
2 changed files with 21 additions and 20 deletions

View File

@ -14,6 +14,7 @@ get_target_property(DOCTEST_INCLUDE_DIRS doctest INTERFACE_INCLUDE_DIRECTORIES)
target_include_directories(doctest SYSTEM INTERFACE ${DOCTEST_INCLUDE_DIRS})
add_subdirectory(install)
set_target_warnings(test-sfml-install)
add_library(sfml-test-main STATIC
TestUtilities/SystemUtil.hpp

View File

@ -6,32 +6,32 @@
int main()
{
// Audio
sf::InputSoundFile input_sound_file;
sf::Listener listener;
sf::Music music;
sf::Sound sound;
[[maybe_unused]] sf::InputSoundFile inputSoundFile;
[[maybe_unused]] sf::Listener listener;
[[maybe_unused]] sf::Music music;
[[maybe_unused]] sf::Sound sound;
// Graphics
sf::Color color;
sf::Font font;
sf::RenderWindow render_window;
sf::Sprite sprite;
sf::Vertex vertex;
[[maybe_unused]] sf::Color color;
[[maybe_unused]] sf::Font font;
[[maybe_unused]] sf::RenderWindow renderWindow;
[[maybe_unused]] sf::Sprite sprite;
[[maybe_unused]] sf::Vertex vertex;
// Network
sf::Ftp ftp;
sf::Http http;
sf::Packet packet;
sf::UdpSocket udp_socket;
[[maybe_unused]] sf::Ftp ftp;
[[maybe_unused]] sf::Http http;
[[maybe_unused]] sf::Packet packet;
[[maybe_unused]] sf::UdpSocket udpSocket;
// System
sf::Angle angle;
sf::FileInputStream file_input_stream;
sf::String string;
sf::Time time;
[[maybe_unused]] sf::Angle angle;
[[maybe_unused]] sf::FileInputStream fileInputStream;
[[maybe_unused]] sf::String string;
[[maybe_unused]] sf::Time time;
// Window
sf::Context context;
sf::VideoMode video_mode;
sf::Window window;
[[maybe_unused]] sf::Context context;
[[maybe_unused]] sf::VideoMode videoMode;
[[maybe_unused]] sf::Window window;
}