mirror of
https://github.com/yse/easy_profiler.git
synced 2024-12-27 08:41:02 +08:00
Merge pull request #127 from mchiasson/patch-2
avoid leaking -std=gnu++11 flag to user's targets
This commit is contained in:
commit
1eb2fa4fa2
@ -3,6 +3,15 @@ project(easy_profiler CXX)
|
|||||||
|
|
||||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||||
|
|
||||||
|
if (CMAKE_VERSION VERSION_LESS "3.1")
|
||||||
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||||
|
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
|
||||||
|
endif ()
|
||||||
|
else ()
|
||||||
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
endif ()
|
||||||
|
|
||||||
option(EASY_PROFILER_NO_GUI "Build easy_profiler without the GUI application (required Qt)" OFF)
|
option(EASY_PROFILER_NO_GUI "Build easy_profiler without the GUI application (required Qt)" OFF)
|
||||||
|
|
||||||
set(EASY_PROGRAM_VERSION_MAJOR 2)
|
set(EASY_PROGRAM_VERSION_MAJOR 2)
|
||||||
|
@ -233,20 +233,6 @@ if (MSVC)
|
|||||||
target_compile_options(easy_profiler PRIVATE /WX)
|
target_compile_options(easy_profiler PRIVATE /WX)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (APPLE)
|
|
||||||
target_compile_options(easy_profiler PUBLIC -std=gnu++11)
|
|
||||||
else ()
|
|
||||||
if (CMAKE_VERSION VERSION_LESS "3.1")
|
|
||||||
if (NOT MSVC)
|
|
||||||
target_compile_options(easy_profiler PUBLIC $<$<COMPILE_LANGUAGE:CXX>:-std=gnu++11>)
|
|
||||||
endif ()
|
|
||||||
else ()
|
|
||||||
if (NOT MSVC)
|
|
||||||
target_compile_options(easy_profiler PUBLIC -std=gnu++11)
|
|
||||||
endif ()
|
|
||||||
set_target_properties(easy_profiler PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED ON)
|
|
||||||
endif ()
|
|
||||||
endif ()
|
|
||||||
# End adding platform specific compile options.
|
# End adding platform specific compile options.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user