From 91304ac1e180c897644d78e3a2f360a84c35c129 Mon Sep 17 00:00:00 2001 From: Jacob Lauritzen Date: Fri, 7 Jan 2022 09:28:23 +0100 Subject: [PATCH] Introduce OATPP_LINK_TEST_LIBRARY --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a803bb5f..3d2d7bf0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,7 @@ project(oatpp VERSION ${OATPP_THIS_MODULE_VERSION} LANGUAGES CXX) option(BUILD_SHARED_LIBS "Build shared libraries" OFF) option(OATPP_INSTALL "Create installation target for oat++" ON) option(OATPP_BUILD_TESTS "Create test target for oat++" ON) +option(OATPP_LINK_TEST_LIBRARY "Link oat++ test library" ON) option(OATPP_LINK_ATOMIC "Link atomic library for other platform than MSVC|MINGW|APPLE|FreeBSD" ON) option(OATPP_MSVC_LINK_STATIC_RUNTIME "MSVC: Link with static runtime (/MT and /MTd)." OFF) @@ -24,7 +25,7 @@ option(OATPP_MSVC_LINK_STATIC_RUNTIME "MSVC: Link with static runtime (/MT and / ## COMPILATION CONFIG ############################################################################# ################################################################################################### -if(OATPP_BUILD_TESTS) +if(OATPP_LINK_TEST_LIBRARY) set(OATPP_THIS_MODULE_LIBRARIES oatpp oatpp-test) ## list of libraries to find when find_package is called set(OATPP_THIS_MODULE_TARGETS oatpp oatpp-test) ## list of targets to install set(OATPP_THIS_MODULE_DIRECTORIES oatpp oatpp-test) ## list of directories to install