From 0971b49fe1bb06b9f71a6ef92b7f55f14b8d0745 Mon Sep 17 00:00:00 2001 From: Alfi Maulana Date: Thu, 12 Jan 2023 14:16:22 +0700 Subject: [PATCH] remove `BUILD_C` and `BUILD_CXX` option in the test project --- test/CMakeLists.txt | 11 +---------- test/hello_world.c | 6 ------ 2 files changed, 1 insertion(+), 16 deletions(-) delete mode 100644 test/hello_world.c diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index a166a0c..04d05be 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,18 +1,9 @@ cmake_minimum_required(VERSION 3.0) project(test) -option(BUILD_C "build hello world in C Language" OFF) -option(BUILD_CXX "build hello world in CXX Language" ON) - option(CHECK_USING_CLANG "check if target is compiled using Clang" OFF) -if(BUILD_C) - add_executable(hello_world_c hello_world.c) -endif() - -if(BUILD_CXX) - add_executable(hello_world hello_world.cpp) -endif() +add_executable(hello_world hello_world.cpp) add_executable(test_c EXCLUDE_FROM_ALL test.c) target_compile_definitions(test_c PRIVATE $<$:CHECK_USING_CLANG>) diff --git a/test/hello_world.c b/test/hello_world.c deleted file mode 100644 index 7791fbb..0000000 --- a/test/hello_world.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main() { - printf("Hello world!\n"); - return 0; -}