From dbcf06e07e070683ecfe19d9c21b86ac658826ea Mon Sep 17 00:00:00 2001 From: Mikhail Komarov Date: Thu, 12 Jan 2017 06:07:32 +0300 Subject: [PATCH] Crosscompilation target architecture made required to be set explicitly --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 73a08be7..80fb3807 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,7 @@ option(WITH_TESTS_COVERAGE "Analyze test coverage using gcov (only for gcc)" OFF option(WITH_BOOST_ATOMIC "Use boost atomics (only for boost >= 1.54)" OFF) option(WITH_ASAN "Build AddressSantinizer instrumented code" OFF) option(WITH_TSAN "Build ThreadSantinizer instrumented code" OFF) +set(CMAKE_TARGET_ARCHITECTURE "" CACHE string "Target build architecture") find_package(Threads) @@ -27,7 +28,9 @@ endif() include_directories(${Boost_INCLUDE_DIRS}) -target_architecture(CMAKE_TARGET_ARCHITECTURE) +if(NOT CMAKE_TARGET_ARCHITECTURE) + target_architecture(CMAKE_TARGET_ARCHITECTURE) +endif() if(WITH_BOOST_ATOMIC) if(Boost_FOUND) -- 2.34.1