Only apply c++14 to current target
This commit is contained in:
parent
42f0b00828
commit
ac0b9a6e45
@ -12,11 +12,11 @@ function(target_activate_cpp14 TARGET)
|
||||
else("${CMAKE_VERSION}" VERSION_GREATER "3.1")
|
||||
check_cxx_compiler_flag("-std=c++14" COMPILER_HAS_CPP14_SUPPORT)
|
||||
if (COMPILER_HAS_CPP14_SUPPORT)
|
||||
target_compile_options(${TARGET} PUBLIC -std=c++14)
|
||||
target_compile_options(${TARGET} PRIVATE -std=c++14)
|
||||
else(COMPILER_HAS_CPP14_SUPPORT)
|
||||
check_cxx_compiler_flag("-std=c++1y" COMPILER_HAS_CPP14_PARTIAL_SUPPORT)
|
||||
if (COMPILER_HAS_CPP14_PARTIAL_SUPPORT)
|
||||
target_compile_options(${TARGET} PUBLIC -std=c++1y)
|
||||
target_compile_options(${TARGET} PRIVATE -std=c++1y)
|
||||
else()
|
||||
message(FATAL_ERROR "Compiler doesn't support C++14")
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user