Skip to content

Commit c7391aa

Browse files
committed
Added configuration options arguments into NCBIptb_setup. JIRA: CXX-14024
git-svn-id: https://anonsvn.ncbi.nlm.nih.gov/repos/v1/trunk/c++@104473 78c7ea69-d796-4a43-9a09-de51944f1b03
1 parent e4e8f46 commit c7391aa

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

src/build-system/cmake/CMake.NCBIpkg.conan.cmake

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,42 @@ endif()
4444
###############################################################################
4545
macro(NCBIptb_setup)
4646
set(_listdir "${NCBI_TREE_CMAKECFG}")
47+
48+
set(_options "NCBI_BUILD_FLAGS;-NCBI_BUILD_FLAGS")
49+
set(_options "${_options};NCBI_CTEST;-NCBI_CTEST")
50+
set(_options "${_options};NCBI_LOCAL_COMPONENTS;-NCBI_LOCAL_COMPONENTS")
51+
set(_keys "COMPONENTS;FEATURES")
52+
foreach(_arg IN ITEMS ${ARGN})
53+
if("${_arg}" IN_LIST _keys)
54+
break()
55+
endif()
56+
if(NOT "${_arg}" IN_LIST _options)
57+
message(FATAL_ERROR "ERROR: Unknown configuration option: ${_arg} (must one of ${_options})")
58+
endif()
59+
endforeach()
60+
cmake_parse_arguments(CFG "${_options}" "" "${_keys}" ${ARGN})
61+
62+
if(NOT NCBI_PTBCFG_NCBI_BUILD_FLAGS)
63+
if(CFG_NCBI_BUILD_FLAGS)
64+
set(NCBI_PTBCFG_NCBI_BUILD_FLAGS ON)
65+
list(APPEND NCBI_PTBCFG_PROJECT_FEATURES ${CFG_FEATURES})
66+
include(${_listdir}/CMakeChecks.compiler.cmake)
67+
endif()
68+
endif()
69+
if(NOT NCBI_PTBCFG_ADDTEST)
70+
if(CFG_NCBI_CTEST)
71+
set(NCBI_PTBCFG_ADDTEST ON)
72+
include(${_listdir}/CMake.NCBIptb.ctest.cmake)
73+
endif()
74+
endif()
75+
if(CFG_NCBI_LOCAL_COMPONENTS)
76+
set(NCBI_PTBCFG_USELOCAL ON)
77+
endif()
78+
if(CFG_-NCBI_LOCAL_COMPONENTS)
79+
set(NCBI_PTBCFG_USELOCAL OFF)
80+
endif()
81+
list(APPEND NCBI_PTBCFG_PROJECT_COMPONENTS ${CFG_COMPONENTS})
82+
4783
include(${_listdir}/CMake.NCBIComponents.cmake)
4884
include_directories(${NCBI_INC_ROOT} ${NCBITK_INC_ROOT})
4985

0 commit comments

Comments
 (0)