mirror of
https://github.com/blender/blender
synced 2026-11-22 03:45:13 +03:00
in #159310 sean tried to add a header only library using blender_add_lib which isn't an unreasonable thing to ask of it, it is just not something that was asked of it before so it failed. We had some manual plumbing for bf_intern_atomic but if this sort of thing it gonna happen more often we may as well make blender_add_lib do the right thing so we don't end up copying a whole bunch of code all over the place. Pull Request: https://projects.blender.org/blender/blender/pulls/159317
35 lines
650 B
CMake
35 lines
650 B
CMake
# SPDX-FileCopyrightText: 2020 Blender Authors
|
|
#
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
set(INC
|
|
INTERFACE .
|
|
)
|
|
|
|
set(INC_SYS
|
|
)
|
|
set(LIB
|
|
)
|
|
|
|
set(SRC
|
|
atomic_ops.h
|
|
intern/atomic_ops_ext.h
|
|
intern/atomic_ops_msvc.h
|
|
intern/atomic_ops_unix.h
|
|
intern/atomic_ops_utils.h
|
|
)
|
|
|
|
blender_add_lib(bf_intern_atomic "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
|
add_library(bf::intern::atomic ALIAS bf_intern_atomic)
|
|
|
|
if(WITH_GTESTS)
|
|
set(TEST_SRC
|
|
tests/atomic_test.cc
|
|
)
|
|
set(TEST_INC
|
|
)
|
|
set(TEST_LIB
|
|
PRIVATE bf_intern_atomic
|
|
)
|
|
blender_add_test_executable(atomic "${TEST_SRC}" "${INC};${TEST_INC}" "${INC_SYS}" "${LIB};${TEST_LIB}")
|
|
endif()
|