Skip to content
Snippets Groups Projects
Commit ebd7c579 authored by Steven Murray's avatar Steven Murray
Browse files

Modified CMakeLists.txt files to apply -Wno-unused-function for GCC 6 and...

Modified CMakeLists.txt files to apply -Wno-unused-function for GCC 6 and above.  It was GCC 7 and above before.
parent 92dc7ca5
No related branches found
No related tags found
No related merge requests found
......@@ -45,12 +45,12 @@ set_property(TARGET ctaschedulerunittests PROPERTY SOVERSION "${CTA_SOVERSION}")
set_property(TARGET ctaschedulerunittests PROPERTY VERSION "${CTA_LIBVERSION}")
if(CMAKE_COMPILER_IS_GNUCC)
# Add -Wno-unused-function compiler flag if using gcc version 7 or greater
if (GCC_VERSION VERSION_EQUAL 7 OR GCC_VERSION VERSION_GREATER 7)
# Add -Wno-unused-function compiler flag if using gcc version 6 or greater
if (GCC_VERSION VERSION_EQUAL 6 OR GCC_VERSION VERSION_GREATER 6)
set_property(SOURCE OStoreDB/OStoreDBTest.cpp APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-unused-function")
set_property(SOURCE SchedulerDatabaseTest.cpp APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-unused-function")
set_property(SOURCE SchedulerTest.cpp APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-unused-function")
endif (GCC_VERSION VERSION_EQUAL 7 OR GCC_VERSION VERSION_GREATER 7)
endif (GCC_VERSION VERSION_EQUAL 6 OR GCC_VERSION VERSION_GREATER 6)
endif(CMAKE_COMPILER_IS_GNUCC)
target_link_libraries (ctaschedulerunittests
......
......@@ -71,10 +71,10 @@ if(CMAKE_COMPILER_IS_GNUCC)
PROPERTY COMPILE_FLAGS " -Wno-unused-local-typedefs")
endforeach(CTATAPESERVERDAEMON_LIBRARY_SRC)
# Add -Wno-unused-function compiler flag if using gcc version 7 or greater
if (GCC_VERSION VERSION_EQUAL 7 OR GCC_VERSION VERSION_GREATER 7)
# Add -Wno-unused-function compiler flag if using gcc version 6 or greater
if (GCC_VERSION VERSION_EQUAL 6 OR GCC_VERSION VERSION_GREATER 6)
set_property(SOURCE DataTransferSessionTest.cpp APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-unused-function")
endif (GCC_VERSION VERSION_EQUAL 7 OR GCC_VERSION VERSION_GREATER 7)
endif (GCC_VERSION VERSION_EQUAL 6 OR GCC_VERSION VERSION_GREATER 6)
endif(GCC_VERSION_GE_4_8_0)
endif(CMAKE_COMPILER_IS_GNUCC)
......@@ -100,10 +100,10 @@ set_property(TARGET ctatapeserverdaemonunittests PROPERTY SOVERSION "${CTA_SOVER
set_property(TARGET ctatapeserverdaemonunittests PROPERTY VERSION "${CTA_LIBVERSION}")
if(CMAKE_COMPILER_IS_GNUCC)
# Add -Wno-unused-function compiler flag if using gcc version 7 or greater
if (GCC_VERSION VERSION_EQUAL 7 OR GCC_VERSION VERSION_GREATER 7)
# Add -Wno-unused-function compiler flag if using gcc version 6 or greater
if (GCC_VERSION VERSION_EQUAL 6 OR GCC_VERSION VERSION_GREATER 6)
set_property(SOURCE RecallReportPackerTest.cpp APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-unused-function")
endif (GCC_VERSION VERSION_EQUAL 7 OR GCC_VERSION VERSION_GREATER 7)
endif (GCC_VERSION VERSION_EQUAL 6 OR GCC_VERSION VERSION_GREATER 6)
endif(CMAKE_COMPILER_IS_GNUCC)
target_link_libraries(ctatapeserverdaemonunittests
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment