interplane.Get Omega
Read in your language

git

[Ported from github.com/git/git] Sync with Git 2.56.1

Brought by drakestapleton

branch master Branches Tags History

git / t / unit-tests / clar / example / CMakeLists.txt

28 lines · 783 bytes Raw Blame History
1find_package(Python COMPONENTS Interpreter REQUIRED)
2
3add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/clar.suite"
4 COMMAND "${Python_EXECUTABLE}" "${CMAKE_SOURCE_DIR}/generate.py" --output "${CMAKE_CURRENT_BINARY_DIR}"
5 DEPENDS main.c example.c
6 WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
7)
8
9add_executable(example)
10set_target_properties(example PROPERTIES
11 C_STANDARD 90
12 C_STANDARD_REQUIRED ON
13 C_EXTENSIONS OFF
14)
15target_sources(example PRIVATE
16 main.c
17 example.c
18 "${CMAKE_CURRENT_BINARY_DIR}/clar.suite"
19)
20target_compile_definitions(example PRIVATE)
21target_compile_options(example PRIVATE
22 $<IF:$<CXX_COMPILER_ID:MSVC>,/W4,-Wall>
23)
24target_include_directories(example PRIVATE
25 "${CMAKE_SOURCE_DIR}"
26 "${CMAKE_CURRENT_BINARY_DIR}"
27)
28target_link_libraries(example clar)