User Tools

Site Tools


cmake

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
cmake [2013/01/22 12:36] – [Linux] milancmake [2013/03/01 17:10] – [Windows (Visual Studio)] mikael.ohman
Line 78: Line 78:
  
 {{:kdevelop_cmake.png}} {{:kdevelop_cmake.png}}
 +
 +==== Python bindings ====
 +With CMake, it is also possible to create shared library loadable as Python module. You need CMake version at least 2.8.8 and two additional cmake parameters ( ''-DUSE_SHARED_LIB=ON'' and ''-DUSE_PYTHON_BINDINGS=ON'' ). After standard ''make'' procedure, ''liboofem.so'' file is created in ''build'' directory. From python it can be loaded and use like this:
 +  import sys
 +  sys.path.append("/path/to/build/directory") # path where liboofem.so was created
 +  import liboofem
 +  
 +  a = liboofem.FloatArray(2)
 +  a[1] = 15.0
 +  a[0] = 10.0
 +  print a[0], a[1]
 +
      
 ===== Windows (Visual Studio) ===== ===== Windows (Visual Studio) =====
Line 85: Line 97:
   - Press generate to produce project files for VS.   - Press generate to produce project files for VS.
  
-To run the test suite, open the solution explorer in VS and "build" the ''test'' target to run through the test suite.+To run the test suite, open the solution explorer in VS and "build" the ''tests'' or ''benchmarks'' targets to run through the test suite or benchmark suite respectively.
  
 //**Note:** The build types (debug, release) are handled internally by Visual Studio, so no configuration option for this is presented in CMake// //**Note:** The build types (debug, release) are handled internally by Visual Studio, so no configuration option for this is presented in CMake//
  
 //**Note:** PETSc isn't easily built on windows, so support for parallel builds is still lacking// //**Note:** PETSc isn't easily built on windows, so support for parallel builds is still lacking//
- 
cmake.txt · Last modified: 2017/01/25 17:34 by smilauer