Julien Dehos преди 7 години
родител
ревизия
e5351e9bff
променени са 6 файла, в които са добавени 42 реда и са изтрити 0 реда
  1. 16 0
      test_module/CMakeLists.txt
  2. 12 0
      test_module/README.md
  3. 14 0
      test_module/run/gafip.mod
  4. 0 0
      test_module/src/mylib.cpp
  5. 0 0
      test_module/src/mylib.hpp
  6. 0 0
      test_module/src/mymain.cpp

+ 16 - 0
test_module/CMakeLists.txt

@@ -0,0 +1,16 @@
+cmake_minimum_required( VERSION 3.0 )
+
+project( mytest )
+
+set( CMAKE_CXX_FLAGS "-Wall -Wextra ${CMAKE_CXX_FLAGS}" )
+
+include_directories( src )
+
+add_library( mylib SHARED src/mylib.cpp )
+
+add_executable( mymain.out src/mymain.cpp )
+target_link_libraries( mymain.out mylib )
+
+install( TARGETS mymain.out DESTINATION bin )
+install( TARGETS mylib DESTINATION lib )
+

+ 12 - 0
test_module/README.md

@@ -0,0 +1,12 @@
+
+```
+mkdir build
+cd build
+cmake -DCMAKE_INSTALL_PREFIX=~/opt ..
+make -j install
+cd ../run
+module use `pwd`
+module load mytest.mod
+mymain.out
+```
+

+ 14 - 0
test_module/run/gafip.mod

@@ -0,0 +1,14 @@
+#%Module -*- tcl -*-
+
+proc ModulesHelp { } {
+        puts stderr "The gafip module" 
+}
+
+module-whatis "genetic algorithms for image processing"
+
+module load OpenCV
+module load Python
+
+append-path  PATH             /nfs/home/lisic/jdehos/opt/bin
+append-path  LD_LIBRARY_PATH  /nfs/home/lisic/jdehos/opt/lib
+append-path  PYTHONPATH       /nfs/home/lisic/jdehos/opt/lib

+ 0 - 0
test_module/src/mylib.cpp


+ 0 - 0
test_module/src/mylib.hpp


+ 0 - 0
test_module/src/mymain.cpp