mirror of
https://github.com/threeal/cmake-action.git
synced 2025-04-21 19:11:21 +00:00
remove BUILD_C
and BUILD_CXX
option in the test project
This commit is contained in:
parent
965ce1d4a8
commit
0971b49fe1
@ -1,18 +1,9 @@
|
|||||||
cmake_minimum_required(VERSION 3.0)
|
cmake_minimum_required(VERSION 3.0)
|
||||||
project(test)
|
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)
|
option(CHECK_USING_CLANG "check if target is compiled using Clang" OFF)
|
||||||
|
|
||||||
if(BUILD_C)
|
add_executable(hello_world hello_world.cpp)
|
||||||
add_executable(hello_world_c hello_world.c)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(BUILD_CXX)
|
|
||||||
add_executable(hello_world hello_world.cpp)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_executable(test_c EXCLUDE_FROM_ALL test.c)
|
add_executable(test_c EXCLUDE_FROM_ALL test.c)
|
||||||
target_compile_definitions(test_c PRIVATE $<$<BOOL:${CHECK_USING_CLANG}>:CHECK_USING_CLANG>)
|
target_compile_definitions(test_c PRIVATE $<$<BOOL:${CHECK_USING_CLANG}>:CHECK_USING_CLANG>)
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
int main() {
|
|
||||||
printf("Hello world!\n");
|
|
||||||
return 0;
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user