Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
LAMBERT Jean-charles
unsio
Commits
b234b960
Commit
b234b960
authored
Mar 14, 2016
by
Jcl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix compilation issue on macosx
parent
fdec419b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
CMakeLists.txt
CMakeLists.txt
+10
-6
No files found.
CMakeLists.txt
View file @
b234b960
...
...
@@ -45,7 +45,7 @@ MESSAGE( STATUS "BUILD_TYPE =" ${RELEASE} )
FIND_PACKAGE
(
NEMO
)
FIND_PACKAGE
(
SQLITE3
)
FIND_PACKAGE
(
HDF5 COMPONENTS CXX
)
FIND_PACKAGE
(
HDF5 COMPONENTS CXX
REQUIRED
)
#SET(HDF5_CXX_LIBRARIES hdf5_hl_cpp hdf5_cpp)
MESSAGE
(
STATUS
"HDF5_CXX_LIBRARIES="
${
HDF5_CXX_LIBRARIES
}
)
...
...
@@ -85,15 +85,19 @@ STRING(REPLACE "-DNDEBUG" "" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE}
# create library "uns"
add_library
(
unsio
${
LIBTYPE
}
${
LIBSOURCES
}
)
target_link_libraries
(
unsio nemo
)
# Manage HDF5 linking against libunsio
if
(
OSX
)
set_target_properties
(
unsio PROPERTIES LINK_FLAGS
"-undefined suppress -flat_namespace -L
${
NEMOLIB
}
-lnemo -lsqlite3"
)
# add " " after .dylib
string
(
REPLACE
".dylib"
".dylib "
HDF5_CXX_LIBRARIES_LIST
${
HDF5_CXX_LIBRARIES
}
)
message
(
STATUS
"HDF5_CXX_LIBRARIES_LIST = "
${
HDF5_CXX_LIBRARIES_LIST
}
)
set_target_properties
(
unsio PROPERTIES LINK_FLAGS
"-undefined suppress -flat_namespace
${
HDF5_CXX_LIBRARIES_LIST
}
-L
${
NEMOLIB
}
-lnemo -lsqlite3"
)
else
(
OSX
)
# libk unsio against hdf5 and sqlit3
# add " " after .so
string
(
REPLACE
".so"
".so "
HDF5_CXX_LIBRARIES_LIST
${
HDF5_CXX_LIBRARIES
}
)
message
(
STATUS
"HDF5_CXX_LIBRARIES_LIST = "
${
HDF5_CXX_LIBRARIES_LIST
}
)
# libk unsio against hdf5 and sqlit3
set_target_properties
(
unsio PROPERTIES LINK_FLAGS
"
${
HDF5_CXX_LIBRARIES_LIST
}
-lsqlite3"
)
endif
(
OSX
)
...
...
@@ -165,7 +169,7 @@ FOREACH(exe_cpp ${execpp_sources})
add_executable
(
${
exe
}
${
exe_cpp
}
)
# Link the executable to the Hello library.
target_link_libraries
(
${
exe
}
unsio
nemo
${
FC_GFORT_LIB
}
${
FC_G77_LIB
}
stdc++
)
target_link_libraries
(
${
exe
}
unsio
${
FC_GFORT_LIB
}
${
FC_G77_LIB
}
stdc++
)
IF
(
${
exe
}
STREQUAL
"uns_info"
)
INSTALL
(
TARGETS
${
exe
}
RUNTIME DESTINATION bin
)
ENDIF
()
...
...
@@ -184,7 +188,7 @@ FOREACH(exe_f ${exe_sources})
# Link the executable to the Hello library.
#target_link_libraries (${exe} unsio nemomaing77 nemo g2c sqlite3 stdc++)
target_link_libraries
(
${
exe
}
unsio nemomaing77
nemo
${
FC_LIB
}
stdc++
)
target_link_libraries
(
${
exe
}
unsio nemomaing77
${
FC_LIB
}
stdc++
)
SET_TARGET_PROPERTIES
(
${
exe
}
PROPERTIES LINKER_LANGUAGE Fortran
)
# add "-lstdc++"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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