]> SALOME platform Git repositories - modules/shaper.git/blob - CMakeLists.txt
Salome HOME
Add new test
[modules/shaper.git] / CMakeLists.txt
1 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.10)
2
3 PROJECT (NewGEOM)
4 SET (NewGeom_Version 1.3.0)
5
6 SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeCommon" ${CMAKE_MODULE_PATH})
7
8 INCLUDE(FindEclipse)
9 INCLUDE(Common)
10 INCLUDE(FindQt)
11 INCLUDE(FindPython)
12 INCLUDE(FindSalome)
13 INCLUDE(FindSolveSpace)
14 INCLUDE(FindCAS)
15 INCLUDE(FindSUIT)
16
17
18 IF(UNIX)
19   IF(CMAKE_COMPILER_IS_GNUCC)
20     #C++11 is not supported on some platforms, disable it 
21     MESSAGE(STATUS "Setting -std=c++0x flag for the gcc...")
22     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
23     
24     #Supporting test coverage checks (gcov) in the DEBUG mode
25     IF(USE_TEST_COVERAGE)
26       INCLUDE(CodeCoverage)
27       MESSAGE(STATUS "Setting flags for gcov support the gcc...")
28       SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
29       SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
30       SET(CMAKE_SHARED_LINKER_FLAGS "-lgcov")
31       
32       SETUP_TARGET_FOR_COVERAGE(test_coverage  # Name for custom target.
33                                 ctest          # Name of the test driver executable that runs the tests.
34                                 coverage)      # Name of output directory.
35     ENDIF(USE_TEST_COVERAGE)
36     
37     #SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -E")
38     MESSAGE(STATUS "gcc flags are: " ${CMAKE_CXX_FLAGS})
39     MESSAGE(STATUS "linker flags are: " ${CMAKE_SHARED_LINKER_FLAGS})
40   ENDIF(CMAKE_COMPILER_IS_GNUCC)
41 ENDIF(UNIX)
42
43 #IF(CMAKE_BUILD_TYPE MATCHES Release)
44 ADD_SUBDIRECTORY (doc)
45 #ENDIF(CMAKE_BUILD_TYPE MATCHES Release)
46 ADD_SUBDIRECTORY (src/Config)
47 ADD_SUBDIRECTORY (src/Events)
48 ADD_SUBDIRECTORY (src/Model)
49 ADD_SUBDIRECTORY (src/ModelAPI)
50 ADD_SUBDIRECTORY (src/GeomAPI)
51 ADD_SUBDIRECTORY (src/GeomAlgoAPI)
52 ADD_SUBDIRECTORY (src/GeomData)
53 ADD_SUBDIRECTORY (src/GeomDataAPI)
54 ADD_SUBDIRECTORY (src/PartSetPlugin)
55 ADD_SUBDIRECTORY (src/ConstructionPlugin)
56 ADD_SUBDIRECTORY (src/FeaturesPlugin)
57 ADD_SUBDIRECTORY (src/SketcherPrs)
58 ADD_SUBDIRECTORY (src/SketchPlugin)
59 ADD_SUBDIRECTORY (src/SketchSolver)
60 ADD_SUBDIRECTORY (src/ModuleBase)
61 ADD_SUBDIRECTORY (src/PartSet)
62 ADD_SUBDIRECTORY (src/AppElements)
63 ADD_SUBDIRECTORY (src/XGUI)
64 ADD_SUBDIRECTORY (src/GeomApp)
65 ADD_SUBDIRECTORY (src/ExchangePlugin)
66 ADD_SUBDIRECTORY (src/GeomValidators)
67 ADD_SUBDIRECTORY (src/InitializationPlugin)
68 ADD_SUBDIRECTORY (src/ParametersPlugin)
69 ADD_SUBDIRECTORY (src/PythonAddons)
70 ADD_SUBDIRECTORY (src/PythonAPI)
71
72 IF(${HAVE_SALOME})
73     ADD_SUBDIRECTORY (src/NewGeom)
74     ADD_SUBDIRECTORY (src/ConnectorPlugin)
75 ENDIF(${HAVE_SALOME})
76
77 ENABLE_TESTING()
78
79 # Add the uninstall target for eclipse IDE
80 if (CMAKE_GENERATOR MATCHES "NMake Makefiles")
81 configure_file("${CMAKE_SOURCE_DIR}/CMakeCommon/cmake_uninstall.cmake.in"
82                "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
83                IMMEDIATE @ONLY)
84 add_custom_target(uninstall
85                   COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
86 endif (CMAKE_GENERATOR MATCHES "NMake Makefiles")