diff --git a/CMakeLists.txt b/CMakeLists.txt index c6a7aebe..08ea4119 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,30 +40,30 @@ set(AU_EXPORT_SET_NAME AuHeaders) if(AU_ENABLE_TESTING) message(STATUS "Unit tests enabled") enable_testing() - - # Bring in GoogleTest so we can build and run the tests. - include(FetchContent) - FetchContent_Declare( - googletest - GIT_REPOSITORY https://github.com/google/googletest.git - GIT_TAG 58d77fa8070e8cec2dc1ed015d66b454c8d78850 # Release 1.12.1 - FIND_PACKAGE_ARGS - 1.12.1 - NAMES GTest - ) - - # https://google.github.io/googletest/quickstart-cmake.html - # For Windows: Prevent overriding the parent project's compiler/linker settings - set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) - - FetchContent_MakeAvailable(googletest) - include(GoogleTest) - - set(AU_CONFIG_FIND_GTEST_LINE "find_dependency(googletest 1.12.1)") else() message(STATUS "Unit tests disabled") endif() +# Bring in GoogleTest so we can build and run the tests. +include(FetchContent) +FetchContent_Declare( + googletest + GIT_REPOSITORY https://github.com/google/googletest.git + GIT_TAG 58d77fa8070e8cec2dc1ed015d66b454c8d78850 # Release 1.12.1 + FIND_PACKAGE_ARGS + 1.12.1 + NAMES GTest +) + +# https://google.github.io/googletest/quickstart-cmake.html +# For Windows: Prevent overriding the parent project's compiler/linker settings +set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) + +FetchContent_MakeAvailable(googletest) +include(GoogleTest) + +set(AU_CONFIG_FIND_GTEST_LINE "find_dependency(googletest 1.12.1)") + add_subdirectory(au) # Configure how Au will be installed.