Commit 66468a73 authored by jclamber's avatar jclamber

better nemolight cmake process

git-svn-id: http://svn.oamp.fr/repos/unsio/trunk@196 ce2cc22f-6084-46ce-a062-084b172ee5dc
parent f7aa4545
......@@ -34,14 +34,14 @@ MESSAGE( STATUS "nemolight OPT =" ${OPT} )
# Lib : libnemo.so
# Find all the sources for the utils LIB
FILE(GLOB LIBUTILS ../src/*.c )
FILE(GLOB LIBUTILS src/*.c )
# create the library "libnemo.so"
#add_library (nemo ${LIBTYPE} ${LIBUTILS})
add_library (nemo STATIC ${LIBUTILS})
# Lib : libnemomaing77.so
# Find all the sources for old fortran compiler
FILE(GLOB LIBUTILS ../src/fortran_old_gcc/*.c )
FILE(GLOB LIBUTILS src/fortran_old_gcc/*.c )
# create the library "libnemomaing77.so"
#add_library (nemomaing77 ${LIBTYPE} ${LIBUTILS})
add_library (nemomaing77 STATIC ${LIBUTILS})
......@@ -51,7 +51,7 @@ if(OSX)
set_target_properties(nemomaing77 PROPERTIES LINK_FLAGS "-undefined suppress -flat_namespace")
endif(OSX)
# Destination path for the lib
SET(LIBRARY_OUTPUT_PATH ../lib)
SET(LIBRARY_OUTPUT_PATH lib)
# compilation options
#add_definitions(-Wall ${OPT} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE)
#add_definitions(${OPT} ${WARNOPT} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE)
......@@ -67,11 +67,11 @@ endif()
STRING(REPLACE "-DNDEBUG" "" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
# SET NEMOPATH
SET(NEMOLIB ${PROJECT_SOURCE_DIR}/../lib)
SET(NEMOINC ${PROJECT_SOURCE_DIR}/../src/inc)
#SET(NEMOLIB ${PROJECT_SOURCE_DIR}/../lib)
#SET(NEMOINC ${PROJECT_SOURCE_DIR}/src/inc)
# Make sure the compiler can find include files from our Hello library.
include_directories (../src/inc /usr/include/malloc)
include_directories (${PROJECT_SOURCE_DIR}/src/inc /usr/include/malloc)
#
# install bin targets
......
......@@ -50,9 +50,9 @@ FIND_PACKAGE(SQLITE3)
IF (NOT NEMO_INSTALLED)
MESSAGE(STATUS "NEMO LIGHT will be build")
add_subdirectory(${PROJECT_SOURCE_DIR}/3rdparty/nemolight/build ${PROJECT_BINARY_DIR}/../3rdparty/nemolight/build )
add_subdirectory(${PROJECT_SOURCE_DIR}/3rdparty/nemolight ${PROJECT_SOURCE_DIR}/3rdparty/nemolight/build-${CMAKE_BUILD_TYPE} )
set(NEMOLIGHT ${PROJECT_SOURCE_DIR}/3rdparty/nemolight)
set(NEMOLIB ${NEMOLIGHT}/lib)
set(NEMOLIB ${NEMOLIGHT}/build-${CMAKE_BUILD_TYPE}/lib)
set(NEMOINC ${NEMOLIGHT}/src/inc)
ELSE (NOT NEMO_INSTALLED)
......@@ -194,8 +194,8 @@ INSTALL(FILES ${UNSIO_BINARY_DIR}/../src/userselection.h DESTINATION inc/uns)
IF (NOT NEMO_INSTALLED)
# install nemo lib
INSTALL(FILES ${NEMOLIGHT}/lib/libnemo.a DESTINATION lib)
INSTALL(FILES ${NEMOLIGHT}/lib/libnemomaing77.a DESTINATION lib)
INSTALL(FILES ${NEMOLIB}/libnemo.a DESTINATION lib)
INSTALL(FILES ${NEMOLIB}/libnemomaing77.a DESTINATION lib)
# Find all NEMOLIGHT header files
FILE(GLOB nlight_files ${NEMOLIGHT}/src/*.h ${NEMOLIGHT}/src/inc/*.h)
......
#
nemocvs:
rsync -Racv src/*.{f,F,cc,h} test_src/*.{f,F,cc,h} CMakeLists.txt cmake/*.cmake doc/*.{odp,pdf,txt} INSTALL mmakefile man/man3/* 3rdparty/nemolight/build/CMakeLists.txt 3rdparty/nemolight/src/*.{c,h} 3rdparty/nemolight/src/inc/*.{c,h} 3rdparty/nemolight/src/inc/snapshot/*.{c,h} 3rdparty/nemolight/src/fortran_old_gcc/*.{c,h} template/uns_devel/cmake/*.cmake template/uns_devel/README template/uns_devel/CMakeLists.txt template/uns_devel/src/*.{c,cc,F} template/uns_devel/lib/src/*.{c,cc,F} scripts/perl/lib/Tools/*.pm scripts/perl/mains/*.pl scripts/sql/*.sql scripts/sql/README ${NEMO}/usr/jcl/unsio
rsync -Racv src/*.{f,F,cc,h} test_src/*.{f,F,cc,h} CMakeLists.txt cmake/*.cmake doc/*.{odp,pdf,txt} INSTALL mmakefile man/man3/* 3rdparty/nemolight/build/CMakeLists.txt 3rdparty/nemolight/src/*.{c,h} 3rdparty/nemolight/src/inc/*.{c,h} 3rdparty/nemolight/src/inc/snapshot/*.{c,h} 3rdparty/nemolight/src/fortran_old_gcc/*.{c,h} template/uns_devel/cmake/*.cmake template/uns_devel/README template/uns_devel/CMakeLists.txt template/uns_devel/src/*.{c,cc,F} template/uns_devel/lib/src/*.{c,cc,F} scripts/perl/lib/Tools/*.pm scripts/perl/mains/*.pl scripts/sql/*.sql scripts/sql/README py/CMakeLists.txt py py/cmake/*.cmake py/INSTALL py/swig/*.i py/test/uns_demo.py py/test/uns_2dplot.py ${NEMO}/usr/jcl/unsio
tar :
cd ..;tar czhvf unsio/unsio-`date "+%d%b-%Y-%H.%M"`.tar.gz `ls unsio/src/*.{f,F,cc,h} unsio/test_src/*.{f,F,cc,h} unsio/CMakeLists.txt unsio/cmake/*.cmake unsio/doc/*.{odp,pdf,txt} unsio/INSTALL unsio/mmakefile unsio/man/man3/* unsio/3rdparty/nemolight/build/CMakeLists.txt unsio/3rdparty/nemolight/src/*.{c,h} unsio/3rdparty/nemolight/src/inc/*.{c,h} unsio/3rdparty/nemolight/src/inc/snapshot/*.{c,h} unsio/3rdparty/nemolight/src/fortran_old_gcc/*.{c,h} unsio/template/uns_devel/cmake/*.cmake unsio/template/uns_devel/README unsio/template/uns_devel/CMakeLists.txt unsio/template/uns_devel/src/*.{c,cc,F} unsio/template/uns_devel/lib/src/*.{c,cc,F} unsio/scripts/perl/lib/Tools/*.pm unsio/scripts/perl/mains/*.pl unsio/scripts/sql/*.sql unsio/scripts/sql/README 2> /dev/null`
cd ..;tar czhvf unsio/unsio-`date "+%d%b-%Y-%H.%M"`.tar.gz `ls unsio/src/*.{f,F,cc,h} unsio/test_src/*.{f,F,cc,h} unsio/CMakeLists.txt unsio/cmake/*.cmake unsio/doc/*.{odp,pdf,txt} unsio/INSTALL unsio/mmakefile unsio/man/man3/* unsio/3rdparty/nemolight/build/CMakeLists.txt unsio/3rdparty/nemolight/src/*.{c,h} unsio/3rdparty/nemolight/src/inc/*.{c,h} unsio/3rdparty/nemolight/src/inc/snapshot/*.{c,h} unsio/3rdparty/nemolight/src/fortran_old_gcc/*.{c,h} unsio/template/uns_devel/cmake/*.cmake unsio/template/uns_devel/README unsio/template/uns_devel/CMakeLists.txt unsio/template/uns_devel/src/*.{c,cc,F} unsio/template/uns_devel/lib/src/*.{c,cc,F} unsio/scripts/perl/lib/Tools/*.pm unsio/scripts/perl/mains/*.pl unsio/scripts/sql/*.sql unsio/scripts/sql/README unsio/py/CMakeLists.txt unsio/py/cmake/*.cmake unsio/py/INSTALL unsio/py/swig/*.i unsio/py/test/uns_demo.py unsio/py/test/uns_2dplot.py 2> /dev/null`
template:
cd template; tar czhvf ../uns_devel.tar.gz `ls uns_devel/cmake/*.cmake uns_devel/README uns_devel/CMakeLists.txt uns_devel/src/*.{c,cc,F} uns_devel/lib/src/*.{c,cc,F}`
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment