Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
psrdada_cpp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MPIfR-BDG
psrdada_cpp
Merge requests
!37
Handle BUILD_DADAFLOW flag dependeing on C++ std and boost::json. Instead of...
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Handle BUILD_DADAFLOW flag dependeing on C++ std and boost::json. Instead of...
dadaflow-build
into
devel
Overview
0
Commits
4
Pipelines
2
Changes
10
Merged
Niclas Esser
requested to merge
dadaflow-build
into
devel
6 months ago
Overview
0
Commits
4
Pipelines
2
Changes
10
Expand
Handle BUILD_DADAFLOW flag dependeing on C++ std and boost::json.
Instead of find_package(OpenMP) use '-fopenmp' flag
Add required CMake flags to debian/rules
0
0
Merge request reports
Compare
devel
version 1
2c78a000
6 months ago
devel (base)
and
latest version
latest version
422ed61c
4 commits,
6 months ago
version 1
2c78a000
3 commits,
6 months ago
10 files
+
45
−
37
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
10
Search (e.g. *.vue) (Ctrl+P)
cmake/compiler_settings.cmake
+
23
−
6
Options
#
# Compiler defaults for cheetah
#
# Set the default build type
if
(
NOT CMAKE_BUILD_TYPE
)
set
(
CMAKE_BUILD_TYPE
"RELEASE"
)
endif
()
# The sub library psrdada_cpp::dadaflow requires at least std=c++20
if
(
BUILD_DADAFLOW
)
# Here we check if the compiler (Clang and GCC) is able to support C++ 20
# Other compilers are not included yet
if
(
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10
)
set
(
CMAKE_CXX_STANDARD 20
)
set
(
CMAKE_CXX_STANDARD_REQUIRED ON
)
# Turn BUILD_DADAFLOW off when the standard is not sufficient
else
()
message
(
WARNING
"The Compiler does not support C++20, psrdada_cpp::dadaflow won't build"
)
message
(
WARNING
"Setting BUILD_DADAFLOW=OFF"
)
set
(
BUILD_DADAFLOW OFF
)
endif
()
endif
()
# Set the minimum standard when BUILD_DADAFLOW is OFF
if
(
NOT BUILD_DADAFLOW
)
set
(
CMAKE_CXX_STANDARD 14
)
set
(
CMAKE_CXX_STANDARD_REQUIRED ON
)
endif
()
# Set compiler flags
set
(
CMAKE_CXX_FLAGS
"--std=c++
${
CMAKE_CXX_STANDARD
}
-fPIC"
)
set
(
CMAKE_CXX_FLAGS
"--std=c++
${
CMAKE_CXX_STANDARD
}
-fPIC
-fopenmp
"
)
set
(
ARCH
"broadwell"
CACHE STRING
"target architecture (-march=native, x86-64), defaults to broadwell"
)
set
(
TUNE
"generic"
CACHE STRING
"target tune architecture (-mtune=native, x86-64), defaults to generic"
)
@@ -19,12 +37,11 @@ if (CMAKE_CXX_COMPILER_ID MATCHES Clang)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Werror -march=
${
ARCH
}
-mtune=
${
TUNE
}
"
)
endif
()
if
(
CMAKE_COMPILER_IS_GNUCXX
)
## -Wl,--no-as-needed avoids linker problem with libfftwf3 on ubuntu systems
set
(
CMAKE_INCLUDE_SYSTEM_FLAG_CXX
"-isystem"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-ignored-attributes -pthread -Werror -Wcast-align -march=
${
ARCH
}
-mtune=
${
TUNE
}
"
)
endif
()
set
(
CMAKE_CXX_FLAGS_RELEASE
"-O3 -DNDEBUG -Wno-unused-local-typedefs"
)
set
(
CMAKE_CXX_FLAGS_RELEASE
"-O3 -DNDEBUG -Wno-unused-local-typedefs
-fprofile-arcs -ftest-coverage
"
)
set
(
CMAKE_CXX_FLAGS_RELWITHDEBINFO
"-O3 -g -Wall -Wextra -pedantic -Wno-unused-local-typedefs -fprofile-arcs -ftest-coverage"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"-O3 -g -pg -Wall -Wextra -pedantic -Wno-unused-local-typedefs -fprofile-arcs -ftest-coverage"
)
Loading