Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
radler
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ResearchAndDevelopment
radler
Commits
e0bc68d2
Commit
e0bc68d2
authored
1 year ago
by
Marcel Loose
Browse files
Options
Downloads
Patches
Plain Diff
Use SetTargetCPU from aocommon
parent
9f9fb200
No related branches found
No related tags found
1 merge request
!127
Use SetTargetCPU from aocommon
Pipeline
#85477
passed
1 year ago
Stage: versioning
Stage: prepare
Stage: linting
Stage: build
Stage: test
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+5
-10
5 additions, 10 deletions
CMakeLists.txt
cpp/CMakeLists.txt
+0
-14
0 additions, 14 deletions
cpp/CMakeLists.txt
external/aocommon
+1
-1
1 addition, 1 deletion
external/aocommon
with
6 additions
and
25 deletions
CMakeLists.txt
+
5
−
10
View file @
e0bc68d2
...
...
@@ -6,7 +6,8 @@ include(ExternalProject)
# When Radler is compiled as an ExternalProject inside another project, set this
# option to On. See, e.g., the wsclean CMake file for an example.
option
(
COMPILE_AS_EXTERNAL_PROJECT OFF
)
option
(
PORTABLE
"Generate portable code"
OFF
)
option
(
PORTABLE
"Build portable binaries (with slightly decreased performance)"
OFF
)
option
(
BUILD_PYTHON_BINDINGS
"Build python bindings"
OFF
)
option
(
BUILD_DOCUMENTATION
"Build documentation"
OFF
)
option
(
BUILD_DOCSTRINGS
"Build docstrings (implies BUILD_DOCUMENTATION)"
OFF
)
...
...
@@ -47,15 +48,6 @@ if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
add_compile_options
(
-DNDEBUG
)
endif
()
include
(
CheckCXXCompilerFlag
)
if
(
PORTABLE
)
if
(
DEFINED TARGET_CPU
)
message
(
WARNING
"You have selected to build PORTABLE binaries. "
"TARGET_CPU settings will be ignored."
)
unset
(
TARGET_CPU CACHE
)
endif
()
endif
()
if
(
NOT COMPILE_AS_EXTERNAL_PROJECT
)
# Include submodules
set
(
ExternalSubmoduleDirectories aocommon pybind11 schaapcommon
)
...
...
@@ -93,6 +85,9 @@ if(NOT COMPILE_AS_EXTERNAL_PROJECT)
endif
()
endif
()
# User may optionally set `TARGET_CPU` if `PORTABLE=OFF`
include
(
external/aocommon/CMake/SetTargetCPU.cmake
)
if
(
COMPILE_AS_EXTERNAL_PROJECT
)
message
(
STATUS
"Radler is compiled as an external project within another project."
)
...
...
This diff is collapsed.
Click to expand it.
cpp/CMakeLists.txt
+
0
−
14
View file @
e0bc68d2
...
...
@@ -69,20 +69,6 @@ target_include_directories(
target_compile_options
(
radler PRIVATE -O3 -Wall -Wzero-as-null-pointer-constant
)
if
(
NOT PORTABLE
)
if
(
DEFINED TARGET_CPU
)
target_compile_options
(
radler BEFORE PRIVATE -march=
${
TARGET_CPU
}
)
else
()
check_cxx_compiler_flag
(
"-march=native"
COMPILER_HAS_MARCH_NATIVE
)
if
(
COMPILER_HAS_MARCH_NATIVE
)
target_compile_options
(
radler BEFORE PRIVATE -march=native
)
else
()
message
(
WARNING
"The compiler doesn't support -march=native for your CPU."
)
endif
()
endif
()
endif
()
if
(
NOT COMPILE_AS_EXTERNAL_PROJECT
)
include
(
GNUInstallDirs
)
install
(
TARGETS radler ARCHIVE DESTINATION
${
CMAKE_INSTALL_FULL_LIBDIR
}
)
...
...
This diff is collapsed.
Click to expand it.
aocommon
@
2363df22
Compare
d2d64c1a
...
2363df22
Subproject commit
d2d64c1abfcc7c98963f50868e34e80a020d9244
Subproject commit
2363df2242671d1835ca67952c16e3bde4a12148
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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