Changeset: 542c16759449 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=542c16759449 Modified Files: CMakeLists.txt testing/CMakeLists.txt Branch: cmake-fun Log Message:
Compiles with Intel compiler on Windows. Also fixed installation of testing python library. diffs (53 lines): diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -181,7 +181,9 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_GNU_SOURCE") # required for tests endif() if(${CMAKE_C_COMPILER_ID} STREQUAL "Intel") - if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + if(WIN32) + add_definitions(/D_CRT_SECURE_NO_WARNINGS) + elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") MT_addCompilerFlag("-no-gcc-include-dir" "-no-gcc-include-dir" "${CMAKE_C_FLAGS}" "all" CMAKE_C_FLAGS) endif() if(EXISTS "${ROOT}/usr/include/math.h") # see https://software.intel.com/en-us/forums/intel-c-compiler/topic/760979 @@ -311,12 +313,8 @@ if(Python3_Interpreter_FOUND) if("${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}" VERSION_LESS ${PYTHON3_REQUIRED_VERSION}) message(WARNING "The Python 3 executable is too old ${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} < ${PYTHON3_REQUIRED_VERSION}") else() - exec_program("${Python3_EXECUTABLE}" ARGS "-c \"import distutils.sysconfig; print(distutils.sysconfig.get_python_lib(1,0,'${LIBDIR}'))\"" OUTPUT_VARIABLE PYTHON3_LIBDIR RETURN_VALUE PYTHON3_LIBDIR_CODE) + exec_program("${Python3_EXECUTABLE}" ARGS "-c \"import distutils.sysconfig; print(distutils.sysconfig.get_python_lib(1,0,'${CMAKE_INSTALL_PREFIX}'))\"" OUTPUT_VARIABLE PYTHON3_LIBDIR RETURN_VALUE PYTHON3_LIBDIR_CODE) if(PYTHON3_LIBDIR AND PYTHON3_LIBDIR_CODE EQUAL 0) - string(LENGTH "${LIBDIR}" LIBDIR_LENGTH) - string(LENGTH "${PYTHON3_LIBDIR}" PYTHON3_LIBDIR_PREFIX_LENGTH) - math(EXPR LEN1 "${LIBDIR_LENGTH}+1") # add the / separator - string(SUBSTRING "${PYTHON3_LIBDIR}" ${LEN1} -1 PYTHON_LIBDIR) # remove the prefix set(HAVE_PYTHON3 ON CACHE INTERNAL "python3 is available") else() message(WARNING "Could not determine MonetDB Python testing files instalation directory") diff --git a/testing/CMakeLists.txt b/testing/CMakeLists.txt --- a/testing/CMakeLists.txt +++ b/testing/CMakeLists.txt @@ -31,7 +31,7 @@ string(REPLACE "\\" "\\\\" QXsysconfdir set(PYTHON3 "${Python3_EXECUTABLE}") string(REPLACE "\\" "\\\\" QXPYTHON3 "${Python3_EXECUTABLE}") -string(REPLACE "\\" "\\\\" QXPYTHON3_LIBDIR "${PYTHON_LIBDIR}") +string(REPLACE "\\" "\\\\" QXPYTHON3_LIBDIR "${PYTHON3_LIBDIR}") if(CMAKE_SIZEOF_VOID_P EQUAL 4) set(BITS32_FALSE "#") @@ -57,10 +57,10 @@ configure_file(monet_options.py.in ${CMA configure_file(listexports.py.in ${CMAKE_CURRENT_BINARY_DIR}/listexports.py @ONLY) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Mtest.py PERMISSIONS ${PROGRAM_PERMISSIONS_DEFAULT} DESTINATION ${BINDIR}) -if(PYTHON_LIBDIR) +if(PYTHON3_LIBDIR) install(FILES Mfilter.py process.py ${CMAKE_CURRENT_BINARY_DIR}/monet_options.py __init__.py ${CMAKE_CURRENT_BINARY_DIR}/listexports.py exportutils.py malcheck.py - DESTINATION ${CMAKE_INSTALL_PREFIX}/${PYTHON_LIBDIR}/MonetDBtesting) + DESTINATION ${PYTHON3_LIBDIR}/MonetDBtesting) endif() if(WIN32) _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list