Fixes cross compiler issues (#1512)
Actions: Modified CMakeLists to check if CMAKE_CXX_COMPILER is set first. Side effect: tests now fail if object is not compiled for host arch. Possible side effect mitgations: compile for both host and target architectures.
This commit is contained in:
parent
a15fc7ba88
commit
9e0b2ab714
@ -110,7 +110,9 @@ option(BUILD_WITH_CXX_11 "Build jsoncpp_lib with C++11 standard." ON)
|
||||
## To compatible with C++0x and C++1x
|
||||
set(CMAKE_MINIMUN_CXX_STANDARD 98)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
set(CMAKE_CXX_COMPILER "/usr/bin/g++")
|
||||
if(NOT CMAKE_CXX_COMPILER)
|
||||
set(CMAKE_CXX_COMPILER "/usr/bin/g++")
|
||||
endif()
|
||||
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE CXX_VERSION)
|
||||
if(CXX_VERSION VERSION_GREATER 4.8.0)
|
||||
if(BUILD_WITH_CXX_11)
|
||||
|
Loading…
Reference in New Issue
Block a user