Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libmtime
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
icon-libraries
libmtime
Commits
48a40e04
Commit
48a40e04
authored
4 months ago
by
Sergey Kosukhin
Browse files
Options
Downloads
Patches
Plain Diff
cmake: save redundant include
parent
aea3b3c2
No related branches found
No related tags found
1 merge request
!50
Refactor CMake scripts
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/CMakeLists.txt
+11
-1
11 additions, 1 deletion
examples/CMakeLists.txt
examples/example_helper.cmake
+0
-16
0 additions, 16 deletions
examples/example_helper.cmake
with
11 additions
and
17 deletions
examples/CMakeLists.txt
+
11
−
1
View file @
48a40e04
...
...
@@ -3,7 +3,17 @@
# SPDX-License-Identifier: BSD-3-Clause
#
include
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/example_helper.cmake"
)
function
(
mtime_add_example test_name file_name
)
cmake_parse_arguments
(
PARSE_ARGV 2 ARG
""
""
"LIBRARIES;DEPENDS"
)
add_executable
(
"
${
test_name
}
"
${
file_name
}
${
ARG_DEPENDS
}
)
target_link_libraries
(
"
${
test_name
}
"
PRIVATE mtime::mtime
${
ARG_LIBRARIES
}
)
set_target_properties
(
${
test_name
}
PROPERTIES Fortran_PREPROCESS ON
)
if
(
MT_ENABLE_MIXED_PRECISION
)
target_compile_definitions
(
${
test_name
}
PRIVATE __MIXED_PRECISION
)
endif
()
endfunction
()
mtime_add_example
(
callback_test callback_test.f90
)
...
...
This diff is collapsed.
Click to expand it.
examples/example_helper.cmake
deleted
100644 → 0
+
0
−
16
View file @
aea3b3c2
# Copyright (c) 2013-2024 MPI-M, Luis Kornblueh, Rahul Sinha and DWD, Florian Prill. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
function
(
mtime_add_example test_name file_name
)
cmake_parse_arguments
(
PARSE_ARGV 2 ARG
""
""
"LIBRARIES;DEPENDS"
)
add_executable
(
"
${
test_name
}
"
${
file_name
}
${
ARG_DEPENDS
}
)
target_link_libraries
(
"
${
test_name
}
"
PRIVATE mtime::mtime
${
ARG_LIBRARIES
}
)
set_target_properties
(
${
test_name
}
PROPERTIES Fortran_PREPROCESS ON
)
if
(
MT_ENABLE_MIXED_PRECISION
)
target_compile_definitions
(
${
test_name
}
PRIVATE __MIXED_PRECISION
)
endif
()
endfunction
()
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