Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
48823811
Commit
48823811
authored
15 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
add ENABLE_OOFELIE (OFF by default) so that we don't have to edit
CMakeLists.txt to set the oofelie flags
parent
03d830b9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+4
-1
4 additions, 1 deletion
CMakeLists.txt
utils/misc/withOOFELIE.cmake
+21
-26
21 additions, 26 deletions
utils/misc/withOOFELIE.cmake
with
25 additions
and
27 deletions
CMakeLists.txt
+
4
−
1
View file @
48823811
...
...
@@ -33,6 +33,7 @@ option(ENABLE_METIS "Enable Metis mesh partitioner" ON)
option
(
ENABLE_NATIVE_FILE_CHOOSER
"Enable native file chooser in GUI"
ON
)
option
(
ENABLE_NETGEN
"Enable Netgen mesh generator"
ON
)
option
(
ENABLE_OCC
"Enable OpenCASCADE geometrical models"
ON
)
option
(
ENABLE_OOFELIE
"Set compiler options to match oofelie settings"
OFF
)
option
(
ENABLE_OSMESA
"Use OSMesa for offscreen rendering"
OFF
)
option
(
ENABLE_PARSER
"Build the GEO file parser"
ON
)
option
(
ENABLE_POST
"Build the post-processing module"
ON
)
...
...
@@ -579,7 +580,9 @@ add_library(lib STATIC EXCLUDE_FROM_ALL ${GMSH_SRC})
set_target_properties
(
lib PROPERTIES OUTPUT_NAME Gmsh
)
if
(
MSVC
)
SET_TARGET_PROPERTIES
(
lib PROPERTIES DEBUG_POSTFIX d
)
# INCLUDE(${CMAKE_SOURCE_DIR}/utils/misc/withOOFELIE.cmake)
if
(
ENABLE_OOFELIE
)
INCLUDE
(
${
CMAKE_SOURCE_DIR
}
/utils/misc/withOOFELIE.cmake
)
endif
(
ENABLE_OOFELIE
)
endif
(
MSVC
)
if
(
HAVE_FLTK
)
...
...
This diff is collapsed.
Click to expand it.
utils/misc/withOOFELIE.cmake
+
21
−
26
View file @
48823811
# Cmake file to compile Gmsh with the suitable compiler Flags
# in order to link gmsh with Oofelie. Uncomment the line :
# INCLUDE(${CMAKE_SOURCE_DIR}/utils/misc/withOOFELIE.cmake)
# in the top CMakeLists.txt file of the gmsh source tree.
OPTION
(
ENABLE_OOFELIE
"Set compiler options for building Gmsh as lib with oofelie compiler setting"
ON
)
IF
(
ENABLE_OOFELIE
)
# Cmake file to compile Gmsh with the suitable compiler Flags in order
# to link gmsh with Oofelie. If ENABLE_OOFELIE is set this file is
# included in the main CMakeLists.txt file.
SET_TARGET_PROPERTIES
(
lib PROPERTIES LINK_FLAGS_RELEASE
"/nodefaultlib:LIBCMT"
)
STRING
(
REPLACE
"/MD"
"/MT /Ot"
CMAKE_CXX_FLAGS_RELEASE
${
CMAKE_CXX_FLAGS_RELEASE
}
)
STRING
(
REPLACE
"/MDd"
"/MTd /Ot"
CMAKE_CXX_FLAGS_DEBUG
${
CMAKE_CXX_FLAGS_DEBUG
}
)
STRING
(
REPLACE
"/MD"
"/MT /Ot"
CMAKE_C_FLAGS_RELEASE
${
CMAKE_C_FLAGS_RELEASE
}
)
STRING
(
REPLACE
"/MDd"
"/MTd /Ot"
CMAKE_C_FLAGS_DEBUG
${
CMAKE_C_FLAGS_DEBUG
}
)
STRING
(
REPLACE
"/O2"
"/Ox"
CMAKE_CXX_FLAGS_RELEASE
${
CMAKE_CXX_FLAGS_RELEASE
}
)
STRING
(
REPLACE
"/O2"
"/Ox"
CMAKE_C_FLAGS_RELEASE
${
CMAKE_C_FLAGS_RELEASE
}
)
STRING
(
REPLACE
"/INCREMENTAL:NO"
"/INCREMENTAL:YES"
CMAKE_MODULE_LINKER_FLAGS_RELEASE
${
CMAKE_MODULE_LINKER_FLAGS_RELEASE
}
)
STRING
(
REPLACE
"/INCREMENTAL:NO"
"/INCREMENTAL:YES"
CMAKE_EXE_LINKER_FLAGS_RELEASE
${
CMAKE_EXE_LINKER_FLAGS_RELEASE
}
)
STRING
(
REPLACE
"/INCREMENTAL:NO"
"/INCREMENTAL:YES"
CMAKE_SHARED_LINKER_FLAGS_RELEASE
${
CMAKE_SHARED_LINKER_FLAGS_RELEASE
}
)
SET_TARGET_PROPERTIES
(
lib PROPERTIES LINK_FLAGS_RELEASE
"/nodefaultlib:LIBCMT"
)
STRING
(
REPLACE
"/MD"
"/MT /Ot"
CMAKE_CXX_FLAGS_RELEASE
${
CMAKE_CXX_FLAGS_RELEASE
}
)
STRING
(
REPLACE
"/MDd"
"/MTd /Ot"
CMAKE_CXX_FLAGS_DEBUG
${
CMAKE_CXX_FLAGS_DEBUG
}
)
STRING
(
REPLACE
"/MD"
"/MT /Ot"
CMAKE_C_FLAGS_RELEASE
${
CMAKE_C_FLAGS_RELEASE
}
)
STRING
(
REPLACE
"/MDd"
"/MTd /Ot"
CMAKE_C_FLAGS_DEBUG
${
CMAKE_C_FLAGS_DEBUG
}
)
STRING
(
REPLACE
"/O2"
"/Ox"
CMAKE_CXX_FLAGS_RELEASE
${
CMAKE_CXX_FLAGS_RELEASE
}
)
STRING
(
REPLACE
"/O2"
"/Ox"
CMAKE_C_FLAGS_RELEASE
${
CMAKE_C_FLAGS_RELEASE
}
)
STRING
(
REPLACE
"/INCREMENTAL:NO"
"/INCREMENTAL:YES"
CMAKE_MODULE_LINKER_FLAGS_RELEASE
${
CMAKE_MODULE_LINKER_FLAGS_RELEASE
}
)
STRING
(
REPLACE
"/INCREMENTAL:NO"
"/INCREMENTAL:YES"
CMAKE_EXE_LINKER_FLAGS_RELEASE
${
CMAKE_EXE_LINKER_FLAGS_RELEASE
}
)
STRING
(
REPLACE
"/INCREMENTAL:NO"
"/INCREMENTAL:YES"
CMAKE_SHARED_LINKER_FLAGS_RELEASE
${
CMAKE_SHARED_LINKER_FLAGS_RELEASE
}
)
SET
(
CMAKE_CXX_FLAGS_RELEASE
${
CMAKE_CXX_FLAGS_RELEASE
}
CACHE STRING
"CXX Compiler Flags for Release"
FORCE
)
SET
(
CMAKE_CXX_FLAGS_DEBUG
${
CMAKE_CXX_FLAGS_DEBUG
}
CACHE STRING
"CXX Compiler Flags for Debug"
FORCE
)
SET
(
CMAKE_C_FLAGS_RELEASE
${
CMAKE_C_FLAGS_RELEASE
}
CACHE STRING
"C Compiler Flags for Release"
FORCE
)
SET
(
CMAKE_C_FLAGS_DEBUG
${
CMAKE_C_FLAGS_DEBUG
}
CACHE STRING
"C Compiler Flags for Debug"
FORCE
)
SET
(
CMAKE_MODULE_LINKER_FLAGS_RELEASE
${
CMAKE_MODULE_LINKER_FLAGS_RELEASE
}
CACHE STRING
"Lib Linker Flags for Release"
FORCE
)
SET
(
CMAKE_EXE_LINKER_FLAGS_RELEASE
${
CMAKE_EXE_LINKER_FLAGS_RELEASE
}
CACHE STRING
"Exe Linker Flags for Release"
FORCE
)
SET
(
CMAKE_SHARED_LINKER_FLAGS_RELEASE
${
CMAKE_SHARED_LINKER_FLAGS_RELEASE
}
CACHE STRING
"Dll Linker Flags for Release"
FORCE
)
SET
(
CMAKE_SHARED_LINKER_FLAGS_RELEASE
${
CMAKE_SHARED_LINKER_FLAGS_RELEASE
}
CACHE STRING
"Dll Linker Flags for Release"
FORCE
)
ENDIF
(
ENABLE_OOFELIE
)
\ No newline at end of file
SET
(
CMAKE_CXX_FLAGS_RELEASE
${
CMAKE_CXX_FLAGS_RELEASE
}
CACHE STRING
"CXX Compiler Flags for Release"
FORCE
)
SET
(
CMAKE_CXX_FLAGS_DEBUG
${
CMAKE_CXX_FLAGS_DEBUG
}
CACHE STRING
"CXX Compiler Flags for Debug"
FORCE
)
SET
(
CMAKE_C_FLAGS_RELEASE
${
CMAKE_C_FLAGS_RELEASE
}
CACHE STRING
"C Compiler Flags for Release"
FORCE
)
SET
(
CMAKE_C_FLAGS_DEBUG
${
CMAKE_C_FLAGS_DEBUG
}
CACHE STRING
"C Compiler Flags for Debug"
FORCE
)
SET
(
CMAKE_MODULE_LINKER_FLAGS_RELEASE
${
CMAKE_MODULE_LINKER_FLAGS_RELEASE
}
CACHE STRING
"Lib Linker Flags for Release"
FORCE
)
SET
(
CMAKE_EXE_LINKER_FLAGS_RELEASE
${
CMAKE_EXE_LINKER_FLAGS_RELEASE
}
CACHE STRING
"Exe Linker Flags for Release"
FORCE
)
SET
(
CMAKE_SHARED_LINKER_FLAGS_RELEASE
${
CMAKE_SHARED_LINKER_FLAGS_RELEASE
}
CACHE STRING
"Dll Linker Flags for Release"
FORCE
)
SET
(
CMAKE_SHARED_LINKER_FLAGS_RELEASE
${
CMAKE_SHARED_LINKER_FLAGS_RELEASE
}
CACHE STRING
"Dll Linker Flags for Release"
FORCE
)
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