Skip to content

Commit eddc787

Browse files
authored
Merge pull request #253 from wxmerkt/topic/move-options-before-base-include
Move block to set OPTIONS before including base.cmake
2 parents 7b4e9b0 + 0f2775f commit eddc787

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

CMakeLists.txt

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,20 @@ ENDIF()
2121
SET(CXX_DISABLE_WERROR True)
2222
SET(CMAKE_VERBOSE_MAKEFILE True)
2323

24+
# ----------------------------------------------------
25+
# --- OPTIONS ---------------------------------------
26+
# Need to be set before including base.cmake
27+
# ----------------------------------------------------
28+
OPTION(INSTALL_DOCUMENTATION "Generate and install the documentation" OFF)
29+
OPTION(SUFFIX_SO_VERSION "Suffix library name with its version" OFF)
30+
31+
IF(DEFINED BUILD_UNIT_TESTS)
32+
MESSAGE(AUTHOR_WARNING "BUILD_UNIT_TESTS is deprecated. Use BUILD_TESTING instead.\
33+
If you are manually building EigenPy from source in an existing build folder,\
34+
we suggest that you delete your build folder and make a new one.")
35+
SET(BUILD_TESTING ${BUILD_UNIT_TESTS})
36+
ENDIF(DEFINED BUILD_UNIT_TESTS)
37+
2438
INCLUDE(cmake/base.cmake)
2539
COMPUTE_PROJECT_ARGS(PROJECT_ARGS LANGUAGES CXX)
2640
PROJECT(${PROJECT_NAME} ${PROJECT_ARGS})
@@ -41,19 +55,6 @@ ELSE(WIN32)
4155
SET(LINK create_symlink)
4256
ENDIF(WIN32)
4357

44-
# ----------------------------------------------------
45-
# --- OPTIONS ---------------------------------------
46-
# ----------------------------------------------------
47-
OPTION(INSTALL_DOCUMENTATION "Generate and install the documentation" FALSE)
48-
OPTION(SUFFIX_SO_VERSION "Suffix library name with its version" OFF)
49-
50-
IF(DEFINED BUILD_UNIT_TESTS)
51-
MESSAGE(AUTHOR_WARNING "BUILD_UNIT_TESTS is deprecated. Use BUILD_TESTING instead.\
52-
If you are manually building Pinocchio from source in an existing build folder,\
53-
we suggest that you delete your build folder and make a new one.")
54-
SET(BUILD_TESTING ${BUILD_UNIT_TESTS})
55-
ENDIF(DEFINED BUILD_UNIT_TESTS)
56-
5758
FINDPYTHON()
5859
FIND_NUMPY()
5960

0 commit comments

Comments
 (0)