From f24cef91537e80e843649efda636c308e318a399 Mon Sep 17 00:00:00 2001 From: spo Date: Thu, 26 May 2016 16:33:46 +0300 Subject: [PATCH] Formatting CMakeLists.txt for ConstructionAPI & ModelHighAPI. Move set(CMAKE_SWIG_FLAGS -threads -Wall) to PythonAPI.cmake. --- CMakeCommon/PythonAPI.cmake | 3 ++- src/ConstructionAPI/CMakeLists.txt | 42 ++++++++++++++--------------- src/ModelHighAPI/CMakeLists.txt | 43 +++++++++++++----------------- 3 files changed, 42 insertions(+), 46 deletions(-) diff --git a/CMakeCommon/PythonAPI.cmake b/CMakeCommon/PythonAPI.cmake index e63cd58bb..7612bf4c8 100644 --- a/CMakeCommon/PythonAPI.cmake +++ b/CMakeCommon/PythonAPI.cmake @@ -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( diff --git a/src/ConstructionAPI/CMakeLists.txt b/src/ConstructionAPI/CMakeLists.txt index cf04d02a5..81ada7e09 100644 --- a/src/ConstructionAPI/CMakeLists.txt +++ b/src/ConstructionAPI/CMakeLists.txt @@ -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) diff --git a/src/ModelHighAPI/CMakeLists.txt b/src/ModelHighAPI/CMakeLists.txt index 4402e74d9..fd5ab5be0 100644 --- a/src/ModelHighAPI/CMakeLists.txt +++ b/src/ModelHighAPI/CMakeLists.txt @@ -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 +) -- 2.39.2