Skip to content

Commit

Permalink
Allow cross-compiled tests via ALLOW_CROSS_COMPILED_TESTS (#602)
Browse files Browse the repository at this point in the history
* Allow cross-compiled tests
  • Loading branch information
Justin Boswell authored Feb 27, 2020
1 parent 64810c0 commit 777d75f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

cmake_minimum_required(VERSION 3.0)
option(STATIC_CRT "Windows specific option that to specify static/dynamic run-time library" OFF)
option(ALLOW_CROSS_COMPILED_TESTS "Allow tests to be compiled via cross compile, for use with qemu" OFF)

project(aws-c-common LANGUAGES C VERSION 0.1.0)

Expand Down Expand Up @@ -234,7 +235,7 @@ configure_file(${CONFIG_HEADER_TEMPLATE}
${GENERATED_CONFIG_HEADER}
ESCAPE_QUOTES)

if (NOT CMAKE_CROSSCOMPILING)
if (ALLOW_CROSS_COMPILED_TESTS OR NOT CMAKE_CROSSCOMPILING)
if (BUILD_TESTING)
add_subdirectory(tests)
endif()
Expand Down

0 comments on commit 777d75f

Please sign in to comment.