Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
arbor
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
arbor-sim
arbor
Commits
6c89c7cd
Unverified
Commit
6c89c7cd
authored
7 years ago
by
Benjamin Cumming
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
repair compiler warnings with AppleClang (#592)
Turns out that CMake thinks Clang and AppleClang are different things.
parent
1ffccf2d
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
aux/ioutil.cpp
+1
-1
1 addition, 1 deletion
aux/ioutil.cpp
cmake/CompilerOptions.cmake
+6
-2
6 additions, 2 deletions
cmake/CompilerOptions.cmake
example/brunel/brunel_miniapp.cpp
+1
-4
1 addition, 4 deletions
example/brunel/brunel_miniapp.cpp
with
8 additions
and
7 deletions
aux/ioutil.cpp
+
1
−
1
View file @
6c89c7cd
...
@@ -18,7 +18,7 @@ std::fstream open_or_throw(const path& p, std::ios_base::openmode mode, bool exc
...
@@ -18,7 +18,7 @@ std::fstream open_or_throw(const path& p, std::ios_base::openmode mode, bool exc
throw
std
::
runtime_error
(
strsub
(
"unable to open file %"
,
p
));
throw
std
::
runtime_error
(
strsub
(
"unable to open file %"
,
p
));
}
}
return
std
::
move
(
file
)
;
return
file
;
}
}
}
// namespace aux
}
// namespace aux
...
...
This diff is collapsed.
Click to expand it.
cmake/CompilerOptions.cmake
+
6
−
2
View file @
6c89c7cd
...
@@ -13,13 +13,14 @@ endif()
...
@@ -13,13 +13,14 @@ endif()
set
(
CXXOPT_WALL
set
(
CXXOPT_WALL
-Wall
-Wall
#
XL C
:
#
Clang
:
#
#
# * Disable 'missing-braces' warning: this will inappropriately
# * Disable 'missing-braces' warning: this will inappropriately
# flag initializations such as
# flag initializations such as
# std::array<int,3> a={1,2,3};
# std::array<int,3> a={1,2,3};
$<IF:$<CXX_COMPILER_ID:XL>,-Wno-missing-braces,>
$<IF:$<CXX_COMPILER_ID:Clang>,-Wno-missing-braces,>
$<IF:$<CXX_COMPILER_ID:AppleClang>,-Wno-missing-braces,>
# Clang:
# Clang:
#
#
...
@@ -28,6 +29,7 @@ set(CXXOPT_WALL
...
@@ -28,6 +29,7 @@ set(CXXOPT_WALL
# effects.
# effects.
$<IF:$<CXX_COMPILER_ID:Clang>,-Wno-potentially-evaluated-expression,>
$<IF:$<CXX_COMPILER_ID:Clang>,-Wno-potentially-evaluated-expression,>
$<IF:$<CXX_COMPILER_ID:AppleClang>,-Wno-potentially-evaluated-expression,>
# * Clang erroneously warns that T is an 'unused type alias'
# * Clang erroneously warns that T is an 'unused type alias'
# in code like this:
# in code like this:
...
@@ -37,10 +39,12 @@ set(CXXOPT_WALL
...
@@ -37,10 +39,12 @@ set(CXXOPT_WALL
# };
# };
$<IF:$<CXX_COMPILER_ID:Clang>,-Wno-unused-local-typedef,>
$<IF:$<CXX_COMPILER_ID:Clang>,-Wno-unused-local-typedef,>
$<IF:$<CXX_COMPILER_ID:AppleClang>,-Wno-unused-local-typedef,>
# * Ignore warning if string passed to snprintf is not a string literal.
# * Ignore warning if string passed to snprintf is not a string literal.
$<IF:$<CXX_COMPILER_ID:Clang>,-Wno-format-security,>
$<IF:$<CXX_COMPILER_ID:Clang>,-Wno-format-security,>
$<IF:$<CXX_COMPILER_ID:AppleClang>,-Wno-format-security,>
# GCC:
# GCC:
#
#
...
...
This diff is collapsed.
Click to expand it.
example/brunel/brunel_miniapp.cpp
+
1
−
4
View file @
6c89c7cd
...
@@ -63,7 +63,7 @@ class brunel_recipe: public recipe {
...
@@ -63,7 +63,7 @@ class brunel_recipe: public recipe {
public:
public:
brunel_recipe
(
cell_size_type
nexc
,
cell_size_type
ninh
,
cell_size_type
next
,
double
in_degree_prop
,
brunel_recipe
(
cell_size_type
nexc
,
cell_size_type
ninh
,
cell_size_type
next
,
double
in_degree_prop
,
float
weight
,
float
delay
,
float
rel_inh_strength
,
double
poiss_lambda
,
int
seed
=
42
)
:
float
weight
,
float
delay
,
float
rel_inh_strength
,
double
poiss_lambda
,
int
seed
=
42
)
:
ncells_exc_
(
nexc
),
ncells_inh_
(
ninh
),
ncells_ext_
(
next
),
delay_
(
delay
),
seed_
(
seed
)
{
ncells_exc_
(
nexc
),
ncells_inh_
(
ninh
),
delay_
(
delay
),
seed_
(
seed
)
{
// Make sure that in_degree_prop in the interval (0, 1]
// Make sure that in_degree_prop in the interval (0, 1]
if
(
in_degree_prop
<=
0.0
||
in_degree_prop
>
1.0
)
{
if
(
in_degree_prop
<=
0.0
||
in_degree_prop
>
1.0
)
{
std
::
out_of_range
(
"The proportion of incoming connections should be in the interval (0, 1]."
);
std
::
out_of_range
(
"The proportion of incoming connections should be in the interval (0, 1]."
);
...
@@ -156,9 +156,6 @@ private:
...
@@ -156,9 +156,6 @@ private:
// Number of inhibitory cells.
// Number of inhibitory cells.
cell_size_type
ncells_inh_
;
cell_size_type
ncells_inh_
;
// Number of Poisson connections each neuron receives
cell_size_type
ncells_ext_
;
// Weight of excitatory synapses.
// Weight of excitatory synapses.
float
weight_exc_
;
float
weight_exc_
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment