Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
libcifpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
libcifpp
Commits
64160569
Commit
64160569
authored
Nov 19, 2020
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disable resources on macOS
parent
4fdfd03c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
2 deletions
+28
-2
GNUmakefile.in
+5
-2
configure
+10
-0
configure.ac
+7
-0
src/CifUtils.cpp
+6
-0
No files found.
GNUmakefile.in
View file @
64160569
...
@@ -85,6 +85,9 @@ CXXFLAGS += -Wall -Wno-multichar -I include
...
@@ -85,6 +85,9 @@ CXXFLAGS += -Wall -Wno-multichar -I include
# Use the DEBUG flag to build debug versions of the code
# Use the DEBUG flag to build debug versions of the code
DEBUG
=
@DEBUG@
DEBUG
=
@DEBUG@
USE_RSRC
=
@USE_RSRC@
DEFINES
+=
USE_RSRC
=
$(USE_RSRC)
ifeq
"$(DEBUG)"
"1"
ifeq
"$(DEBUG)"
"1"
DEFINES
+=
DEBUG
DEFINES
+=
DEBUG
CXXFLAGS
+=
-g
-O0
CXXFLAGS
+=
-g
-O0
...
@@ -191,7 +194,7 @@ $(OBJDIR)/%.o: %.cpp | $(OBJDIR)
...
@@ -191,7 +194,7 @@ $(OBJDIR)/%.o: %.cpp | $(OBJDIR)
.PHONY
:
clean
.PHONY
:
clean
clean
:
clean
:
rm
-rf
.libs
$(OBJDIR)
/
*
$(LIB_TARGET)
rm
-rf
.libs
$(OBJDIR)
/
*
$(LIB_TARGET)
rm
-f
$
(
TESTS:%
=
%-test
)
rm
-f
$
(
TESTS:%
=
test
/
%-test
)
.PHONY
:
distclean
.PHONY
:
distclean
distclean
:
clean
distclean
:
clean
...
@@ -209,7 +212,7 @@ $(1)_OBJECTS = $$(OBJDIR)/$(1)-test.o
...
@@ -209,7 +212,7 @@ $(1)_OBJECTS = $$(OBJDIR)/$(1)-test.o
test/$(1)-test
:
$(LIB_TARGET) $$($(1)_OBJECTS)
test/$(1)-test
:
$(LIB_TARGET) $$($(1)_OBJECTS)
@
echo
">>> building
$
(1)-test"
@
echo
">>> building
$
(1)-test"
$(
LIBTOOL)
--silent
--tag
=
CXX
--mode
=
link
$(
CXX)
$(CXXFLAGS)
$(LDFLAGS)
-o
$$
@
$$
(
$
(
1
)
_OBJECTS
)
-L
.libs
-lcifpp
$(LIBS)
$(CXX)
$(CXXFLAGS)
$(LDFLAGS)
-o
$$
@
$$
(
$
(
1
)
_OBJECTS
)
-L
.libs
-lcifpp
$(LIBS)
.PHONY
:
$(1)-test
.PHONY
:
$(1)-test
$(1)-test
:
test/$(1)-test
$(1)-test
:
test/$(1)-test
...
...
configure
View file @
64160569
...
@@ -647,6 +647,7 @@ SET_MAKE
...
@@ -647,6 +647,7 @@ SET_MAKE
PKG_CONFIG
PKG_CONFIG
CCP4
CCP4
UPDATE_REVISION
UPDATE_REVISION
USE_RSRC
DEBUG
DEBUG
LIBCIF_SEMANTIC_VERSION
LIBCIF_SEMANTIC_VERSION
LIBCIF_LT_VERSION
LIBCIF_LT_VERSION
...
@@ -16102,6 +16103,15 @@ if test "x$enable_revision" != "xyes" ; then :
...
@@ -16102,6 +16103,15 @@ if test "x$enable_revision" != "xyes" ; then :
fi
fi
case
$host
in
#(
*
-apple-
*
)
:
USE_RSRC
=
0
;;
#(
*
)
:
USE_RSRC
=
1
;;
esac
UPDATE_REVISION
=
$UPDATE_REVISION
UPDATE_REVISION
=
$UPDATE_REVISION
...
...
configure.ac
View file @
64160569
...
@@ -83,6 +83,13 @@ AS_IF([test "x$enable_revision" != "xyes" ], [
...
@@ -83,6 +83,13 @@ AS_IF([test "x$enable_revision" != "xyes" ], [
UPDATE_REVISION=1
UPDATE_REVISION=1
])
])
dnl disable resources on macOS
AS_CASE([$host],
[*-apple-*], [USE_RSRC=0],
[USE_RSRC=1]
)
AC_SUBST([USE_RSRC])
AC_SUBST([UPDATE_REVISION], [$UPDATE_REVISION])
AC_SUBST([UPDATE_REVISION], [$UPDATE_REVISION])
AC_ARG_VAR([CCP4], [The location where CCP4 is installed])
AC_ARG_VAR([CCP4], [The location where CCP4 is installed])
...
...
src/CifUtils.cpp
View file @
64160569
...
@@ -749,6 +749,8 @@ void Progress::message(const std::string& inMessage)
...
@@ -749,6 +749,8 @@ void Progress::message(const std::string& inMessage)
}
}
#if USE_RSRC
// --------------------------------------------------------------------
// --------------------------------------------------------------------
//
//
// Try to find a named resource. Can be either a local file with this name,
// Try to find a named resource. Can be either a local file with this name,
...
@@ -1155,6 +1157,8 @@ namespace mrsrc
...
@@ -1155,6 +1157,8 @@ namespace mrsrc
using
istream
=
basic_istream
<
char
,
std
::
char_traits
<
char
>>
;
using
istream
=
basic_istream
<
char
,
std
::
char_traits
<
char
>>
;
}
}
#endif
// --------------------------------------------------------------------
// --------------------------------------------------------------------
namespace
cif
namespace
cif
...
@@ -1177,12 +1181,14 @@ std::unique_ptr<std::istream> loadResource(std::filesystem::path name)
...
@@ -1177,12 +1181,14 @@ std::unique_ptr<std::istream> loadResource(std::filesystem::path name)
result
.
reset
(
file
.
release
());
result
.
reset
(
file
.
release
());
}
}
#if USE_RSRC
if
(
not
result
)
if
(
not
result
)
{
{
mrsrc
::
rsrc
rsrc
(
name
);
mrsrc
::
rsrc
rsrc
(
name
);
if
(
rsrc
)
if
(
rsrc
)
result
.
reset
(
new
mrsrc
::
istream
(
rsrc
));
result
.
reset
(
new
mrsrc
::
istream
(
rsrc
));
}
}
#endif
return
result
;
return
result
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment