]> Devoid-pointer.net GitWeb - libHPCS.git/commitdiff
Use more appropriate CMake facilities to define build options
authorMichal Malý <madcatxster@devoid-pointer.net>
Thu, 11 May 2017 09:42:26 +0000 (11:42 +0200)
committerMichal Malý <madcatxster@devoid-pointer.net>
Thu, 11 May 2017 09:42:26 +0000 (11:42 +0200)
CMakeLists.txt

index 5b1871cda5d1d540370c0030497a0fdc0f7fef8a..6cbbf524c3e08b41239f9036a33cb841fda14971 100644 (file)
@@ -3,6 +3,8 @@ include(TestBigEndian)
 
 project(libHPCS)
 
+option(BUILD_TEST_TOOL "Build a simple test tool to check the library's operation" OFF)
+
 set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})
 add_definitions("-std=c89 -Wall -Wextra -fvisibility=hidden")
 
@@ -41,7 +43,7 @@ install(TARGETS HPCS
        PUBLIC_HEADER DESTINATION include)
 
 
-if (${BuildTestTool})
+if (BUILD_TEST_TOOL)
   set(libHPCS_test_SRCS
       test_tool.c)