Clean up CMake files (#3417)

* Clean up CMake files

* bump CMake minimum required version to 3.7 to utilize
  [`VERSION_GREATER_EQUAL`](https://cmake.org/cmake/help/v3.7/release/3.7.html#index-0-command:if)
* improve catch-dependency
* fix conditionals
* use early return
* properly use CMake commands

* Apply suggestions from code review

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
This commit is contained in:
Eisuke Kawashima
2020-11-28 16:00:39 +09:00
committed by GitHub
parent 22a49fc760
commit e0b665bfe1
13 changed files with 62 additions and 72 deletions

View File

@@ -54,7 +54,7 @@ FILE(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/src/org/RDKit COPY_DEST)
# Setup a few variables for environment-specific things
if(WIN32)
ADD_DEFINITIONS("/W3 /wd4716 /wd4101 /bigobj")
ADD_COMPILE_OPTIONS(/W3 /wd4716 /wd4101 /bigobj)
SET(PATH_SEP ";")
SET(COPY_CMD xcopy ${COPY_SOURCE} ${COPY_DEST} /Y /I)
else()
@@ -67,7 +67,7 @@ if(APPLE)
SET(CMAKE_SIZEOF_VOID_P 4)
endif(APPLE)
if(CMAKE_SIZEOF_VOID_P MATCHES 4)
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
SET(CMAKE_SWIG_FLAGS -package "org.RDKit")
else()
if (WIN32)