Configure contrib build flag per each configuration (#2041)
author박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Tue, 30 Oct 2018 06:01:45 +0000 (15:01 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Tue, 30 Oct 2018 06:01:45 +0000 (15:01 +0900)
BUILD_CONTRIB_<TAG> value is fixed at the first configure run and never
updated with the current implementation.

With this commit, BUILD_CONTRIB_<TAG> value is updated properly per each
configure run.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
contrib/CMakeLists.txt

index 80b5f31..73dea58 100644 (file)
@@ -1,7 +1,7 @@
 function(add_nncc_contrib_directory DIR)
   string(TOUPPER ${DIR} PREFIX)
 
-  set(BUILD_CONTRIB_${PREFIX} ON CACHE BOOL "Build contrib/${dir}")
+  option(BUILD_CONTRIB_${PREFIX} "Build contrib/${dir}" ON)
 
   if(BUILD_CONTRIB_${PREFIX})
     add_subdirectory(${DIR})