mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:27:35 +00:00
Build: FreeBSD support
This commit is contained in:
parent
76bcd284f9
commit
4e27c58be7
3 changed files with 25 additions and 1 deletions
|
@ -79,7 +79,16 @@ TEST_CASE(assign_copy_self)
|
||||||
{
|
{
|
||||||
RefPtr<Object> object = adopt(*new Object);
|
RefPtr<Object> object = adopt(*new Object);
|
||||||
EXPECT_EQ(object->ref_count(), 1);
|
EXPECT_EQ(object->ref_count(), 1);
|
||||||
object = object;
|
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wself-assign-overloaded"
|
||||||
|
#endif
|
||||||
|
object = object;
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
EXPECT_EQ(object->ref_count(), 1);
|
EXPECT_EQ(object->ref_count(), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,11 @@
|
||||||
#include <AK/Weakable.h>
|
#include <AK/Weakable.h>
|
||||||
#include <AK/WeakPtr.h>
|
#include <AK/WeakPtr.h>
|
||||||
|
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wunused-private-field"
|
||||||
|
#endif
|
||||||
|
|
||||||
class SimpleWeakable : public Weakable<SimpleWeakable> {
|
class SimpleWeakable : public Weakable<SimpleWeakable> {
|
||||||
public:
|
public:
|
||||||
SimpleWeakable() {}
|
SimpleWeakable() {}
|
||||||
|
@ -37,6 +42,10 @@ private:
|
||||||
int m_member { 123 };
|
int m_member { 123 };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
TEST_CASE(basic_weak)
|
TEST_CASE(basic_weak)
|
||||||
{
|
{
|
||||||
WeakPtr<SimpleWeakable> weak1;
|
WeakPtr<SimpleWeakable> weak1;
|
||||||
|
|
|
@ -65,6 +65,12 @@ Notes:
|
||||||
pkg_add bash gmp gcc git flock gmake sudo
|
pkg_add bash gmp gcc git flock gmake sudo
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### FreeBSD prerequisites
|
||||||
|
```
|
||||||
|
$ pkg add coreutils gmake bash sudo git
|
||||||
|
$ ln -s /usr/local/bin/ginstall /usr/local/bin/install
|
||||||
|
```
|
||||||
|
|
||||||
### Build
|
### Build
|
||||||
> Before starting, make sure that you have configured your global identity for git, or the first script will fail after running for a bit.
|
> Before starting, make sure that you have configured your global identity for git, or the first script will fail after running for a bit.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue