Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Compiling code and using MPI - lecture
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
SCITAS
Courses
Compiling code and using MPI
Compiling code and using MPI - lecture
Commits
c59feb12
Commit
c59feb12
authored
3 years ago
by
Mathieu Peybernes
Browse files
Options
Downloads
Patches
Plain Diff
Update CMakeLists.txt
parent
3af556a6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/compilationWithCmakeAdvanced/CMakeLists.txt
+2
-10
2 additions, 10 deletions
examples/compilationWithCmakeAdvanced/CMakeLists.txt
with
2 additions
and
10 deletions
examples/compilationWithCmakeAdvanced/CMakeLists.txt
+
2
−
10
View file @
c59feb12
cmake_minimum_required
(
VERSION 2.8.11
)
project
(
SAXPY
)
set
(
CMAKE_VERBOSE_MAKEFILE ON
)
# Since different compilers support different options, a typical use of this command is in a compiler-specific conditional clause:
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"Clang"
)
# using Clang
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"Intel"
)
# using Intel C++
elseif
(
CMAKE_CXX_COMPILER_ID STREQUAL
"GNU"
)
add_compile_options
(
-Wall -Wextra -pedantic -Werror -O3
)
# using GCC
elseif
(
CMAKE_CXX_COMPILER_ID STREQUAL
"Intel"
)
# using Intel C++
elseif
(
CMAKE_CXX_COMPILER_ID STREQUAL
"MSVC"
)
# using Visual Studio C++
add_compile_options
(
-Wall -Wextra -pedantic -Werror -O3
)
# using GCC
endif
()
# List of source files into "SOURCES"
...
...
@@ -33,5 +26,4 @@ add_executable (exec main.c)
# Link the executable to the saxpy library. Since the saxpy library has
# public include directories we will use those link directories when building
# exec
target_link_libraries
(
exec LINK_PUBLIC saxpy
)
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