33cmake_minimum_required (VERSION 3.1)
44
55set (PROJECT_NAME eigenpy_example_custom_numeric_type)
6- set (PROJECT_DESCRIPTION "An example of using eigenpy with a custom numeric type: Boost.Multiprecision complex numbers" )
7- set (PROJECT_URL "http://github.com/stack-of-tasks/eigenpy/examples/custom_numeric_type" )
6+ set (PROJECT_DESCRIPTION
7+ "An example of using eigenpy with a custom numeric type: Boost.Multiprecision complex numbers"
8+ )
9+ set (PROJECT_URL
10+ "http://github.com/stack-of-tasks/eigenpy/examples/custom_numeric_type" )
811set (PROJECT_USE_CMAKE_EXPORT TRUE )
912set (PROJECT_USE_KEYWORD_LINK_LIBRARIES TRUE )
1013set (PROJECT_CUSTOM_HEADER_EXTENSION "hpp" )
1114set (PROJECT_COMPATIBILITY_VERSION AnyNewerVersion)
1215
13-
14-
1516# Check if the submodule cmake have been initialized
1617set (JRL_CMAKE_MODULES "${CMAKE_CURRENT_LIST_DIR} /cmake" )
1718if (NOT EXISTS "${CMAKE_SOURCE_DIR} /cmake/base.cmake" )
@@ -31,7 +32,6 @@ if(NOT EXISTS "${CMAKE_SOURCE_DIR}/cmake/base.cmake")
3132 endif ()
3233endif ()
3334
34-
3535# Disable -Werror on Unix for now.
3636set (CXX_DISABLE_WERROR True )
3737set (CMAKE_VERBOSE_MAKEFILE True )
@@ -41,29 +41,24 @@ option(SUFFIX_SO_VERSION "Suffix library name with its version" OFF)
4141
4242if (DEFINED BUILD_UNIT_TESTS)
4343 message (
44- AUTHOR_WARNING
45- "BUILD_UNIT_TESTS is deprecated. Use BUILD_TESTING instead." )
44+ AUTHOR_WARNING "BUILD_UNIT_TESTS is deprecated. Use BUILD_TESTING instead." )
4645 set (BUILD_TESTING ${BUILD_UNIT_TESTS} )
4746endif (DEFINED BUILD_UNIT_TESTS)
4847
49-
5048include ("${JRL_CMAKE_MODULES} /base.cmake" )
5149compute_project_args(PROJECT_ARGS LANGUAGES CXX)
5250project (${PROJECT_NAME} ${PROJECT_ARGS} )
5351
54-
5552include ("${JRL_CMAKE_MODULES} /boost.cmake" )
5653include ("${JRL_CMAKE_MODULES} /python.cmake" )
5754include ("${JRL_CMAKE_MODULES} /ide.cmake" )
5855include ("${JRL_CMAKE_MODULES} /apple.cmake" )
5956
60-
6157option (GENERATE_PYTHON_STUBS
6258 "Generate the Python stubs associated to the Python library" OFF )
6359
6460string (REPLACE "-pedantic" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} )
6561
66-
6762# If needed, fix CMake policy for APPLE systems
6863apply_default_apple_configuration()
6964check_minimal_cxx_standard(11 ENFORCE)
@@ -82,12 +77,10 @@ endif()
8277set (PYTHON_EXPORT_DEPENDENCY ON )
8378findpython(REQUIRED)
8479
85-
8680if (${NUMPY_VERSION} VERSION_LESS "1.16.0" )
8781 set (NUMPY_WITH_BROKEN_UFUNC_SUPPORT TRUE )
8882endif ()
8983
90-
9184if (WIN32 )
9285 link_directories (${PYTHON_LIBRARY_DIRS} )
9386 # # Set default Windows build paths SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY
@@ -97,8 +90,6 @@ if(WIN32)
9790 # ${PROJECT_BINARY_DIR}/Bin CACHE PATH "Sing$le directory for all archives")
9891endif (WIN32 )
9992
100-
101-
10293# ----------------------------------------------------
10394# --- DEPENDENCIES -----------------------------------
10495# ----------------------------------------------------
@@ -110,28 +101,21 @@ export_boost_default_options()
110101find_package (Boost REQUIRED)
111102search_for_boost_python(REQUIRED)
112103
113-
114104# ----------------------------------------------------
115105# --- INCLUDE ----------------------------------------
116106# ----------------------------------------------------
117- set (${PROJECT_NAME} _HEADERS
118- include /header.hpp)
119-
107+ set (${PROJECT_NAME} _HEADERS include /header.hpp)
120108
121109set (${PROJECT_NAME} _SOURCES src/src.cpp)
122110
123-
124-
125111add_library (${PROJECT_NAME} SHARED ${${PROJECT_NAME} _SOURCES}
126112 ${${PROJECT_NAME} _HEADERS})
127113
128-
129114target_include_directories (
130115 ${PROJECT_NAME} SYSTEM
131116 PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR} /include >
132117 $<INSTALL_INTERFACE:include >)
133118
134-
135119modernize_target_link_libraries(
136120 ${PROJECT_NAME}
137121 SCOPE
@@ -141,7 +125,6 @@ modernize_target_link_libraries(
141125 INCLUDE_DIRS
142126 ${EIGEN3_INCLUDE_DIR} )
143127
144-
145128modernize_target_link_libraries(
146129 ${PROJECT_NAME}
147130 SCOPE
@@ -152,15 +135,10 @@ modernize_target_link_libraries(
152135 ${NUMPY_INCLUDE_DIRS}
153136 ${PYTHON_INCLUDE_DIR} )
154137
155-
156-
157138if (SUFFIX_SO_VERSION)
158139 set_target_properties (${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION} )
159140endif (SUFFIX_SO_VERSION)
160141
161-
162-
163-
164142if (NOT WIN32 )
165143 target_compile_options (
166144 ${PROJECT_NAME} PRIVATE $<$<CXX_COMPILER_ID:MSVC >:-bigobj>
@@ -214,13 +192,9 @@ install(
214192# ----------------------------------------------------
215193# --- PYTHON LIBRARY ---------------------------------
216194# ----------------------------------------------------
217- #add_subdirectory(python)
195+ # add_subdirectory(python)
218196
219197pkg_config_append_libs(${PROJECT_NAME} )
220198pkg_config_append_cflags("-I${PYTHON_INCLUDE_DIRS} " )
221199pkg_config_append_cflags("-I${NUMPY_INCLUDE_DIRS} " )
222200pkg_config_append_boost_libs(${BOOST_COMPONENTS} )
223-
224-
225-
226-
0 commit comments