Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Scientific Software
Takin
mag-core
Commits
745ae275
Verified
Commit
745ae275
authored
Jan 19, 2021
by
Tobias WEBER
Browse files
added system-specific build options
parent
2b18ed06
Changes
3
Hide whitespace changes
Inline
Side-by-side
tools/magstructfact/CMakeLists.txt
View file @
745ae275
...
...
@@ -10,6 +10,16 @@ project(magstructfact)
set
(
CMAKE_VERBOSE_MAKEFILE TRUE
)
option
(
BUILD_LIB
"build as dynamic library"
FALSE
)
# system specific settings
message
(
"Building for
${
CMAKE_SYSTEM_NAME
}
systems."
)
if
(
CMAKE_SYSTEM_NAME STREQUAL
"Windows"
)
# pass linker --subsystem option
add_compile_options
(
-Wl,--subsystem,windows
)
elseif
(
CMAKE_SYSTEM_NAME STREQUAL
"Darwin"
)
add_compile_options
(
-mmacosx-version-min=10.10
)
endif
()
find_package
(
Boost REQUIRED
)
find_package
(
Qt5 REQUIRED COMPONENTS Core Gui Widgets OpenGL
)
...
...
tools/pol/CMakeLists.txt
View file @
745ae275
...
...
@@ -11,19 +11,43 @@ project(pol)
set
(
CMAKE_VERBOSE_MAKEFILE TRUE
)
option
(
BUILD_LIB
"build as dynamic library"
FALSE
)
# -----------------------------------------------------------------------------
# system specific settings
message
(
"Building for
${
CMAKE_SYSTEM_NAME
}
systems."
)
if
(
CMAKE_SYSTEM_NAME STREQUAL
"Windows"
)
# pass linker --subsystem option
add_compile_options
(
-Wl,--subsystem,windows
)
elseif
(
CMAKE_SYSTEM_NAME STREQUAL
"Darwin"
)
add_compile_options
(
-mmacosx-version-min=10.10
)
endif
()
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# packages
find_package
(
Boost REQUIRED
)
find_package
(
Qt5 REQUIRED COMPONENTS Core Gui Widgets OpenGL
)
set
(
CMAKE_AUTOUIC TRUE
)
set
(
CMAKE_AUTOMOC TRUE
)
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# compiler settings
set
(
CMAKE_CXX_STANDARD 20
)
add_compile_options
(
-std=c++20
)
add_compile_options
(
${
Boost_CXX_FLAGS
}
)
add_compile_options
(
-Wall -Wextra
)
include_directories
(
"
${
PROJECT_SOURCE_DIR
}
"
"
${
Boost_INCLUDE_DIRS
}
/.."
"../.."
)
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# output
if
(
BUILD_LIB
)
set
(
CMAKE_POSITION_INDEPENDENT_CODE TRUE
)
...
...
@@ -37,3 +61,4 @@ endif()
target_link_libraries
(
takin_pol
${
Boost_LIBRARIES
}
)
qt5_use_modules
(
takin_pol Core Gui Widgets OpenGL
)
# -----------------------------------------------------------------------------
tools/structfact/CMakeLists.txt
View file @
745ae275
...
...
@@ -10,6 +10,16 @@ project(structfact)
set
(
CMAKE_VERBOSE_MAKEFILE TRUE
)
option
(
BUILD_LIB
"build as dynamic library"
FALSE
)
# system specific settings
message
(
"Building for
${
CMAKE_SYSTEM_NAME
}
systems."
)
if
(
CMAKE_SYSTEM_NAME STREQUAL
"Windows"
)
# pass linker --subsystem option
add_compile_options
(
-Wl,--subsystem,windows
)
elseif
(
CMAKE_SYSTEM_NAME STREQUAL
"Darwin"
)
add_compile_options
(
-mmacosx-version-min=10.10
)
endif
()
find_package
(
Boost REQUIRED
)
find_package
(
Qt5 REQUIRED COMPONENTS Core Gui Widgets OpenGL
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment