Skip to content

Commit

Permalink
cmake : Remove unnecessary disabled warnings and cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippe Groarke committed Dec 1, 2018
1 parent f2b8e80 commit fae6031
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
10 changes: 3 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,9 @@ target_include_directories(${TEST_NAME} PRIVATE "${SG14_TEST_SOURCE_DIRECTORY}")

# Compile options
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
target_compile_options(${TEST_NAME} PRIVATE -Wall -Wextra -Wfatal-errors -Werror)
set_source_files_properties(${SG14_TEST_SOURCE_DIRECTORY}/plf_colony_test.cpp PROPERTIES
COMPILE_FLAGS "-Wno-unused-parameter"
)
target_compile_options(${TEST_NAME} PRIVATE -Wall -Wextra -Werror)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
target_compile_options(${TEST_NAME} PRIVATE -Wall -Wextra -Wfatal-errors -Werror)
target_compile_options(${TEST_NAME} PRIVATE -Wall -Wextra -Werror)
set_source_files_properties(${SG14_TEST_SOURCE_DIRECTORY}/plf_colony_test.cpp PROPERTIES
COMPILE_FLAGS "-Wno-unused-parameter"
)
Expand All @@ -80,6 +77,5 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
target_compile_options(${TEST_NAME} PRIVATE /Zc:__cplusplus /permissive- /W4 /WX)
add_definitions(-DNOMINMAX -D_SCL_SECURE_NO_WARNINGS)
set_source_files_properties(${SG14_TEST_SOURCE_DIRECTORY}/plf_colony_test.cpp PROPERTIES
COMPILE_FLAGS "/wd4100 /wd4456 /wd4127"
)
COMPILE_FLAGS "/wd4127") # Disable conditional expression is constant, use if constexpr
endif()
9 changes: 4 additions & 5 deletions SG14_test/plf_colony_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,11 @@
#endif



#include <functional> // std::greater
#include <vector> // range-insert testing
#include <algorithm> // std::find
#include <cstdio> // log redirection, printf
#include <cstdlib> // abort
#include <functional> // std::greater
#include <vector> // range-insert testing

#ifdef PLF_MOVE_SEMANTICS_SUPPORT
#include <utility> // std::move
Expand All @@ -146,11 +145,11 @@ namespace
}
}

void title1(const char *title_text)
void title1(const char *)
{
}

void title2(const char *title_text)
void title2(const char *)
{
}

Expand Down

0 comments on commit fae6031

Please sign in to comment.