CMakeList updated
This commit is contained in:
parent
589e1961d8
commit
e647985bd7
@ -8,24 +8,24 @@ set(TGT "projet_lzw")
|
|||||||
set(${TGT}_VERSION_MAJOR 0)
|
set(${TGT}_VERSION_MAJOR 0)
|
||||||
set(${TGT}_VERSION_MINOR 1)
|
set(${TGT}_VERSION_MINOR 1)
|
||||||
|
|
||||||
set(CXX_COVERAGE_COMPILE_FLAGS "-std=c++1z -pedantic -Wall -Wextra -Wold-style-cast -Woverloaded-virtual -Wfloat-equal -Wwrite-strings -Wpointer-arith -Wcast-qual -Wcast-align -Wconversion -Wsign-conversion -Wshadow -Weffc++ -Wredundant-decls -Wdouble-promotion -Winit-self -Wswitch-default -Wswitch-enum -Wundef -Winline -Wunused -Wnon-virtual-dtor -pthread")
|
set(CXX_COVERAGE_COMPILE_FLAGS "-pedantic -Wall -Wextra -Wold-style-cast -Woverloaded-virtual -Wfloat-equal -Wwrite-strings -Wpointer-arith -Wcast-qual -Wcast-align -Wconversion -Wsign-conversion -Wshadow -Weffc++ -Wredundant-decls -Wdouble-promotion -Winit-self -Wswitch-default -Wswitch-enum -Wundef -Winline -Wunused -Wnon-virtual-dtor -pthread")
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "${CXX_COVERAGE_COMPILE_FLAGS} -DDebug -g -pg")
|
set(CMAKE_CXX_FLAGS_DEBUG "${CXX_COVERAGE_COMPILE_FLAGS} -DDebug -g -pg")
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "${CXX_COVERAGE_COMPILE_FLAGS} -O3")
|
set(CMAKE_CXX_FLAGS_RELEASE "${CXX_COVERAGE_COMPILE_FLAGS} -O3")
|
||||||
|
|
||||||
include(CheckCXXCompilerFlag)
|
include(CheckCXXCompilerFlag)
|
||||||
|
|
||||||
# Check for standard to use
|
# Check for standard to use
|
||||||
#check_cxx_compiler_flag(-std=c++17 HAVE_FLAG_STD_CXX17)
|
check_cxx_compiler_flag(-std=c++17 HAVE_FLAG_STD_CXX17)
|
||||||
#if(HAVE_FLAG_STD_CXX17)
|
if(HAVE_FLAG_STD_CXX17)
|
||||||
# set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
#else()
|
else()
|
||||||
# check_cxx_compiler_flag(-std=c++1z HAVE_FLAG_STD_CXX1Z)
|
check_cxx_compiler_flag(-std=c++1z HAVE_FLAG_STD_CXX1Z)
|
||||||
# if(HAVE_FLAG_STD_CXX1Z)
|
if(HAVE_FLAG_STD_CXX1Z)
|
||||||
# set(CXX_COVERAGE_COMPILE_FLAGS "${CXX_COVERAGE_COMPILE_FLAGS} -std=c++1z")
|
set(CXX_COVERAGE_COMPILE_FLAGS "${CXX_COVERAGE_COMPILE_FLAGS} -std=c++1z")
|
||||||
# else()
|
else()
|
||||||
# message( FATAL_ERROR "C++17 not supported, CMake will exit." )
|
message( FATAL_ERROR "C++17 not supported, CMake will exit." )
|
||||||
# endif()
|
endif()
|
||||||
#endif()
|
endif()
|
||||||
|
|
||||||
# set(CMAKE_CXX_STANDARD 17)
|
# set(CMAKE_CXX_STANDARD 17)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED YES)
|
set(CMAKE_CXX_STANDARD_REQUIRED YES)
|
||||||
|
Loading…
Reference in New Issue
Block a user