Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Lustrec - public version
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LustreC
Lustrec - public version
Commits
719f4b27
Commit
719f4b27
authored
9 years ago
by
Eric Noulard
Browse files
Options
Downloads
Patches
Plain Diff
Update FindLustre in order to handle a default VERBOSE option set to 0
and the proper c99 compiler option
parent
94a9eddf
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
share/FindLustre.cmake
+19
-3
19 additions, 3 deletions
share/FindLustre.cmake
with
19 additions
and
3 deletions
share/FindLustre.cmake
+
19
−
3
View file @
719f4b27
...
...
@@ -15,7 +15,15 @@
# The module defines some functions:
# Lustre_Compile([NODE <Lustre Main Node>]
# LUS_FILES <Lustre files>
# [USER_C_FILES <C files>])
# [USER_C_FILES <C files>]
# [VERBOSE <level>]
# LIBNAME <libraryName>)
#
# When used the Lustre_Compile macro define the variable
# LUSTRE_GENERATED_C_FILES_<libraryName> in the parent scope
# so that the caller can get (if needed) the list of Lustre generated files.
# The VERBOSE level is a numeric value passed directly to the -verbose
# command line option of the lustre compiler
#
if
(
LUSTRE_PATH_HINT
)
...
...
@@ -65,7 +73,7 @@ find_path(LUSTRE_INCLUDE_DIR
include
(
CMakeParseArguments
)
function
(
Lustre_Compile
)
set
(
options
""
)
set
(
oneValueArgs NODE LIBNAME
)
set
(
oneValueArgs NODE LIBNAME
VERBOSE
)
set
(
multiValueArgs LUS_FILES USER_C_FILES
)
cmake_parse_arguments
(
LUS
"
${
options
}
"
"
${
oneValueArgs
}
"
"
${
multiValueArgs
}
"
${
ARGN
}
)
...
...
@@ -81,6 +89,13 @@ function(Lustre_Compile)
set
(
LUSTRE_OUTPUT_DIR
"
${
CMAKE_CURRENT_BINARY_DIR
}
/lus_
${
LUS_LIBNAME
}
"
)
endif
()
if
(
LUS_VERBOSE
)
set
(
LUSTRE_VERBOSE_OPT
"-verbose
${
LUS_VERBOSE
}
"
)
else
()
# the default is to be quiet.
set
(
LUSTRE_VERBOSE_OPT
"-verbose;0"
)
endif
()
file
(
MAKE_DIRECTORY
${
LUSTRE_OUTPUT_DIR
}
)
set
(
GLOBAL_LUSTRE_GENERATED_C_FILES
""
)
# create list of generated C files in parent scope
...
...
@@ -97,7 +112,7 @@ function(Lustre_Compile)
set
(
LUSTRE_GENERATED_FILES
${
LUSTRE_GENERATED_FILES
}
${
LUSTRE_OUTPUT_DIR
}
/
${
L
}
.lusic
)
add_custom_command
(
OUTPUT
${
LUSTRE_GENERATED_FILES
}
COMMAND
${
LUSTRE_COMPILER
}
${
LUSTRE_NODE_OPT
}
-d
${
LUSTRE_OUTPUT_DIR
}
${
LFILE
}
COMMAND
${
LUSTRE_COMPILER
}
${
LUSTRE_VERBOSE_OPT
}
${
LUSTRE_NODE_OPT
}
-d
${
LUSTRE_OUTPUT_DIR
}
${
LFILE
}
DEPENDS
${
LFILE
}
WORKING_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
COMMENT
"Compile Lustre source(s):
${
LFILE
}
(generates:
${
LUSTRE_GENERATED_FILES
}
)."
...
...
@@ -109,6 +124,7 @@ function(Lustre_Compile)
add_library
(
${
LUS_LIBNAME
}
SHARED
${
GLOBAL_LUSTRE_GENERATED_C_FILES
}
${
LUS_USER_C_FILES
}
)
set_target_properties
(
${
LUS_LIBNAME
}
PROPERTIES COMPILE_FLAGS
"-std=c99"
)
set
(
LUSTRE_GENERATED_C_FILES_
${
LUS_LIBNAME
}
"
${
GLOBAL_LUSTRE_GENERATED_C_FILES
}
"
PARENT_SCOPE
)
message
(
STATUS
"Lustre: Added rule for building lustre library:
${
LUS_LIBNAME
}
"
)
endfunction
(
Lustre_Compile
)
...
...
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