]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Formatting CMakeLists.txt for ConstructionAPI & ModelHighAPI. Move set(CMAKE_SWIG_FLA...
authorspo <sergey.pokhodenko@opencascade.com>
Thu, 26 May 2016 13:33:46 +0000 (16:33 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Fri, 17 Jun 2016 11:41:01 +0000 (14:41 +0300)
CMakeCommon/PythonAPI.cmake
src/ConstructionAPI/CMakeLists.txt
src/ModelHighAPI/CMakeLists.txt

index e63cd58bb06a30113a3c28c8eaa3e0787d1a6e20..7612bf4c88cd0b8e58a67d3d5dc6ef227db16c9a 100644 (file)
@@ -3,7 +3,8 @@
 find_package(SWIG REQUIRED)
 include(${SWIG_USE_FILE})
 
-set(CMAKE_SWIG_FLAGS "-Wall")
+#TODO(spo): is -threads necessary?
+set(CMAKE_SWIG_FLAGS -threads -Wall)
 
 # For doxyhelp.i
 include_directories(
index cf04d02a57831642b101939b5e929906f39f0e94..81ada7e09743285ce7b4f355d6f090da4b509d38 100644 (file)
@@ -3,23 +3,23 @@
 INCLUDE(Common)
 
 SET(PROJECT_HEADERS
-    ConstructionAPI.h
-    ConstructionAPI_Point.h
-    )
+  ConstructionAPI.h
+  ConstructionAPI_Point.h
+)
 
 SET(PROJECT_SOURCES
-    ConstructionAPI_Point.cpp
-    )
+  ConstructionAPI_Point.cpp
+)
 
 SET(PROJECT_LIBRARIES
-    ModelAPI
-    ModelHighAPI
-    )
+  ModelAPI
+  ModelHighAPI
+)
 
 INCLUDE_DIRECTORIES(
-    ${PROJECT_SOURCE_DIR}/src/ModelAPI
-    ${PROJECT_SOURCE_DIR}/src/ModelHighAPI
-    )
+  ${PROJECT_SOURCE_DIR}/src/ModelAPI
+  ${PROJECT_SOURCE_DIR}/src/ModelHighAPI
+)
 
 #TODO(spo): is ${CAS_DEFINITIONS} necessary?
 ADD_DEFINITIONS(-DCONSTRUCTIONAPI_EXPORTS ${CAS_DEFINITIONS})
@@ -35,16 +35,16 @@ SET_SOURCE_FILES_PROPERTIES(ConstructionAPI.i PROPERTIES SWIG_DEFINITIONS "-shad
 
 #TODO(spo): is ModelAPI necessary or it could be received by INTERFACE_ ?
 SET(SWIG_LINK_LIBRARIES
-    ConstructionAPI
-    ModelHighAPI
-    ModelAPI
-    ${PYTHON_LIBRARIES}
-    )
+  ConstructionAPI
+  ModelHighAPI
+  ModelAPI
+  ${PYTHON_LIBRARIES}
+)
 
 SET(SWIG_MODULE_ConstructionAPI_EXTRA_DEPS ${SWIG_MODULE_ConstructionAPI_EXTRA_DEPS}
-    ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i
-    ${PROJECT_HEADERS}
-    )
+  ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i
+  ${PROJECT_HEADERS}
+)
 
 SWIG_ADD_MODULE(ConstructionAPI python ConstructionAPI.i ${PROJECT_HEADERS})
 SWIG_LINK_LIBRARIES(ConstructionAPI ${SWIG_LINK_LIBRARIES})
@@ -62,7 +62,7 @@ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/ConstructionAPI.py DESTINATION ${SHAPE
 INCLUDE(UnitTest)
 
 ADD_UNIT_TESTS(
-    TestPoint.py
-    )
+  TestPoint.py
+)
 
 ADD_SUBDIRECTORY (Test)
index 4402e74d9601bda70c1dd2c461ee4409a2163608..fd5ab5be01e25a135a1d43b2081637dfe5b59283 100644 (file)
@@ -3,20 +3,20 @@
 INCLUDE(Common)
 
 SET(PROJECT_HEADERS
-    ModelHighAPI.h
-    ModelHighAPI_Double.h
-    ModelHighAPI_Interface.h
-    )
+  ModelHighAPI.h
+  ModelHighAPI_Double.h
+  ModelHighAPI_Interface.h
+)
 
 SET(PROJECT_SOURCES
-    ModelHighAPI_Double.cpp
-    ModelHighAPI_Interface.cpp
-    )
+  ModelHighAPI_Double.cpp
+  ModelHighAPI_Interface.cpp
+)
 
 SET(PROJECT_LIBRARIES
-    Config
-    Events
-    )
+  Config
+  Events
+)
 
 ADD_DEFINITIONS(-DMODELHIGHAPI_EXPORTS)
 ADD_LIBRARY(ModelHighAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
@@ -28,27 +28,22 @@ TARGET_LINK_LIBRARIES(ModelHighAPI ${PROJECT_LIBRARIES})
 
 INCLUDE(PythonAPI)
 
-#TODO(spo): is it necessary?
-SET(CMAKE_SWIG_FLAGS -threads -Wall)
-
 SET_SOURCE_FILES_PROPERTIES(ModelHighAPI.i PROPERTIES CPLUSPLUS ON)
 SET_SOURCE_FILES_PROPERTIES(ModelHighAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
 
 SET(SWIG_LINK_LIBRARIES
-    ModelHighAPI
-    ${PYTHON_LIBRARIES}
-    )
+  ModelHighAPI
+  ${PYTHON_LIBRARIES}
+)
 
 INCLUDE_DIRECTORIES(
-    ${PROJECT_SOURCE_DIR}/src/Events
-    ${PROJECT_SOURCE_DIR}/src/ModelAPI
-#                    ${PROJECT_SOURCE_DIR}/src/GeomAPI
-#                    ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
+  ${PROJECT_SOURCE_DIR}/src/Events
+  ${PROJECT_SOURCE_DIR}/src/ModelAPI
 )
 
 SET(SWIG_SCRIPTS
-    ${CMAKE_CURRENT_BINARY_DIR}/ModelHighAPI.py
-    )
+  ${CMAKE_CURRENT_BINARY_DIR}/ModelHighAPI.py
+)
 
 SWIG_ADD_MODULE(ModelHighAPI python ModelHighAPI.i ${PROJECT_HEADERS})
 SWIG_LINK_LIBRARIES(ModelHighAPI ${SWIG_LINK_LIBRARIES})
@@ -66,5 +61,5 @@ INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
 INCLUDE(UnitTest)
 
 ADD_UNIT_TESTS(
-    TestDouble.py
-    )
+  TestDouble.py
+)