|
@ -9,14 +9,6 @@ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") |
|
|
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG -DETH_RELEASE") |
|
|
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG -DETH_RELEASE") |
|
|
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DETH_RELEASE") |
|
|
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DETH_RELEASE") |
|
|
|
|
|
|
|
|
if (PROFILING) |
|
|
|
|
|
set(CMAKE_CXX_FLAGS "-g ${CMAKE_CXX_FLAGS}") |
|
|
|
|
|
add_definitions(-DETH_PROFILING_GPERF) |
|
|
|
|
|
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -lprofiler") |
|
|
|
|
|
# set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} -lprofiler") |
|
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lprofiler") |
|
|
|
|
|
endif () |
|
|
|
|
|
|
|
|
|
|
|
execute_process( |
|
|
execute_process( |
|
|
COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) |
|
|
COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) |
|
|
if (NOT (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7)) |
|
|
if (NOT (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7)) |
|
@ -61,6 +53,14 @@ else () |
|
|
message(WARNING "Your compiler is not tested, if you run into any issues, we'd welcome any patches.") |
|
|
message(WARNING "Your compiler is not tested, if you run into any issues, we'd welcome any patches.") |
|
|
endif () |
|
|
endif () |
|
|
|
|
|
|
|
|
|
|
|
if (PROFILING AND (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))) |
|
|
|
|
|
set(CMAKE_CXX_FLAGS "-g ${CMAKE_CXX_FLAGS}") |
|
|
|
|
|
add_definitions(-DETH_PROFILING_GPERF) |
|
|
|
|
|
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -lprofiler") |
|
|
|
|
|
# set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} -lprofiler") |
|
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lprofiler") |
|
|
|
|
|
endif () |
|
|
|
|
|
|
|
|
if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")) |
|
|
if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")) |
|
|
option(USE_LD_GOLD "Use GNU gold linker" ON) |
|
|
option(USE_LD_GOLD "Use GNU gold linker" ON) |
|
|
if (USE_LD_GOLD) |
|
|
if (USE_LD_GOLD) |
|
|