mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-17 17:58:09 +08:00
Only set flags if the compiler support them
This commit is contained in:
@@ -12,7 +12,16 @@ set(TEST_NAMES
|
|||||||
test_parse_file
|
test_parse_file
|
||||||
)
|
)
|
||||||
|
|
||||||
add_definitions("-Wall -Wpedantic")
|
CHECK_CXX_COMPILER_FLAG("-Wall" COMPILER_SUPPORTS_WALL)
|
||||||
|
CHECK_CXX_COMPILER_FLAG("-Wpedantic" COMPILER_SUPPORTS_WPEDANTIC)
|
||||||
|
|
||||||
|
if(COMPILER_SUPPORTS_WALL)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(COMPILER_SUPPORTS_WPEDANTIC)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wpedantic")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(test_library_dependencies)
|
set(test_library_dependencies)
|
||||||
find_library(BOOST_UNITTEST_FRAMEWORK_LIBRARY boost_unit_test_framework)
|
find_library(BOOST_UNITTEST_FRAMEWORK_LIBRARY boost_unit_test_framework)
|
||||||
|
Reference in New Issue
Block a user