Commit 5551c038 authored by COULAUD Olivier's avatar COULAUD Olivier

Update de morse (February 14th, 2018)

parent 63309ad0
...@@ -34,19 +34,19 @@ ...@@ -34,19 +34,19 @@
if (MORSE_ENABLE_WARNING) if (MORSE_ENABLE_WARNING)
if(CMAKE_C_COMPILER_ID MATCHES GNU) if(CMAKE_C_COMPILER_ID MATCHES GNU)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fdiagnostics-show-option")
elseif(CMAKE_C_COMPILER_ID MATCHES Intel) elseif(CMAKE_C_COMPILER_ID MATCHES Intel)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w3 -diag-disable:remark") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w3 -diag-disable:remark")
endif() endif()
if(CMAKE_CXX_COMPILER_ID MATCHES GNU) if(CMAKE_CXX_COMPILER_ID MATCHES GNU)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fdiagnostics-show-option")
elseif(CMAKE_CXX_COMPILER_ID MATCHES Intel) elseif(CMAKE_CXX_COMPILER_ID MATCHES Intel)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w3 -diag-disable:remark") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w3 -diag-disable:remark")
endif() endif()
if(CMAKE_Fortran_COMPILER_ID MATCHES GNU) if(CMAKE_Fortran_COMPILER_ID MATCHES GNU)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Wall") set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Wall -fdiagnostics-show-option")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES Intel) elseif(CMAKE_Fortran_COMPILER_ID MATCHES Intel)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -warn all -diag-disable:remark") set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -warn all -diag-disable:remark")
endif() endif()
...@@ -56,21 +56,21 @@ endif(MORSE_ENABLE_WARNING) ...@@ -56,21 +56,21 @@ endif(MORSE_ENABLE_WARNING)
if (MORSE_ENABLE_COVERAGE) if (MORSE_ENABLE_COVERAGE)
if(CMAKE_C_COMPILER_ID MATCHES GNU) if(CMAKE_C_COMPILER_ID MATCHES GNU)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -fno-inline --coverage")
else() else()
message(FATAL_ERROR "Code coverage is only available with the GNU C (gcc)" message(FATAL_ERROR "Code coverage is only available with the GNU C (gcc)"
"\n compiler, please turn MORSE_ENABLE_COVERAGE OFF\n.") "\n compiler, please turn MORSE_ENABLE_COVERAGE OFF\n.")
endif() endif()
if(CMAKE_CXX_COMPILER_ID MATCHES GNU) if(CMAKE_CXX_COMPILER_ID MATCHES GNU)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -fno-inline --coverage")
else() else()
message(FATAL_ERROR "Code coverage is only available with the GNU CXX" message(FATAL_ERROR "Code coverage is only available with the GNU CXX"
"\n (g++) compiler, please turn MORSE_ENABLE_COVERAGE OFF\n.") "\n (g++) compiler, please turn MORSE_ENABLE_COVERAGE OFF\n.")
endif() endif()
if(CMAKE_Fortran_COMPILER_ID MATCHES GNU) if(CMAKE_Fortran_COMPILER_ID MATCHES GNU)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} --coverage") set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fPIC -fno-inline --coverage")
else() else()
message(FATAL_ERROR "Code coverage is only available with the GNU" message(FATAL_ERROR "Code coverage is only available with the GNU"
"\n Fortran (gfortran) compiler, please turn MORSE_ENABLE_COVERAGE" "\n Fortran (gfortran) compiler, please turn MORSE_ENABLE_COVERAGE"
......
...@@ -30,6 +30,9 @@ ...@@ -30,6 +30,9 @@
# This include is required to check symbols of libs in the main CMakeLists.txt # This include is required to check symbols of libs in the main CMakeLists.txt
include(CheckFunctionExists) include(CheckFunctionExists)
# This include is required to check defines in headers
include(CheckIncludeFiles)
# To colorize messages # To colorize messages
#include(ColorizeMessage) #include(ColorizeMessage)
......
...@@ -3,8 +3,7 @@ ...@@ -3,8 +3,7 @@
# @copyright (c) 2009-2014 The University of Tennessee and The University # @copyright (c) 2009-2014 The University of Tennessee and The University
# of Tennessee Research Foundation. # of Tennessee Research Foundation.
# All rights reserved. # All rights reserved.
# @copyright (c) 2012-2014 Inria. All rights reserved. # @copyright (c) 2012-2016 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
# @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
# #
### ###
# #
...@@ -158,6 +157,10 @@ endif() ...@@ -158,6 +157,10 @@ endif()
# the target receives a -DPRECISION_p in its cflags. # the target receives a -DPRECISION_p in its cflags.
# #
include(ParseArguments) include(ParseArguments)
# Add a hint to help Cmake to find the correct python version:
# (see https://cmake.org/cmake/help/v3.0/module/FindPythonInterp.html)
set(Python_ADDITIONAL_VERSIONS 2)
find_package(PythonInterp REQUIRED) find_package(PythonInterp REQUIRED)
MACRO(precisions_rules_py) MACRO(precisions_rules_py)
...@@ -237,10 +240,9 @@ MACRO(precisions_rules_py) ...@@ -237,10 +240,9 @@ MACRO(precisions_rules_py)
COMMAND ${CMAKE_COMMAND} -E remove -f ${_dependency_OUTPUT} && ${pythoncmd} && chmod a-w ${_dependency_OUTPUT} COMMAND ${CMAKE_COMMAND} -E remove -f ${_dependency_OUTPUT} && ${pythoncmd} && chmod a-w ${_dependency_OUTPUT}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_dependency_INPUT} ${RP_CODEGEN} ${RP_${CMAKE_PROJECT_NAME}_DICTIONNARY}) DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_dependency_INPUT} ${RP_CODEGEN} ${RP_${CMAKE_PROJECT_NAME}_DICTIONNARY})
set_SOURCE_FILES_PROPERTIES(${_dependency_OUTPUT} PROPERTIES COMPILE_FLAGS "-DPRECISION_${_dependency_PREC}" GENERATED 1 IS_IN_BINARY_DIR 1 ) set_source_files_properties(${_dependency_OUTPUT} PROPERTIES COMPILE_FLAGS "-DPRECISION_${_dependency_PREC}" GENERATED 1 IS_IN_BINARY_DIR 1 )
else( generate_out ) else( generate_out )
set_SOURCE_FILES_PROPERTIES(${_dependency_OUTPUT} PROPERTIES COMPILE_FLAGS "-DPRECISION_${_dependency_PREC}" GENERATED 0 ) set_source_files_properties(${_dependency_OUTPUT} PROPERTIES COMPILE_FLAGS "-DPRECISION_${_dependency_PREC}" GENERATED 0 )
endif( generate_out ) endif( generate_out )
list(APPEND ${OUTPUTLIST} ${_dependency_OUTPUT}) list(APPEND ${OUTPUTLIST} ${_dependency_OUTPUT})
......
This diff is collapsed.
This diff is collapsed.
...@@ -372,6 +372,9 @@ endif(BLAS_FOUND) ...@@ -372,6 +372,9 @@ endif(BLAS_FOUND)
if (CBLAS_LIBRARIES) if (CBLAS_LIBRARIES)
list(GET CBLAS_LIBRARIES 0 first_lib) list(GET CBLAS_LIBRARIES 0 first_lib)
get_filename_component(first_lib_path "${first_lib}" PATH) get_filename_component(first_lib_path "${first_lib}" PATH)
if (NOT CBLAS_LIBRARY_DIRS)
set(CBLAS_LIBRARY_DIRS "${first_lib_path}")
endif()
if (${first_lib_path} MATCHES "(/lib(32|64)?$)|(/lib/intel64$|/lib/ia32$)") if (${first_lib_path} MATCHES "(/lib(32|64)?$)|(/lib/intel64$|/lib/ia32$)")
string(REGEX REPLACE "(/lib(32|64)?$)|(/lib/intel64$|/lib/ia32$)" "" not_cached_dir "${first_lib_path}") string(REGEX REPLACE "(/lib(32|64)?$)|(/lib/intel64$|/lib/ia32$)" "" not_cached_dir "${first_lib_path}")
set(CBLAS_DIR_FOUND "${not_cached_dir}" CACHE PATH "Installation directory of CBLAS library" FORCE) set(CBLAS_DIR_FOUND "${not_cached_dir}" CACHE PATH "Installation directory of CBLAS library" FORCE)
......
This diff is collapsed.
...@@ -82,8 +82,8 @@ if( PKG_CONFIG_EXECUTABLE AND NOT EZTRACE_GIVEN_BY_USER ) ...@@ -82,8 +82,8 @@ if( PKG_CONFIG_EXECUTABLE AND NOT EZTRACE_GIVEN_BY_USER )
#endif() #endif()
else() else()
message(STATUS "${Magenta}Looking for EZTRACE - not found using PkgConfig." message(STATUS "${Magenta}Looking for EZTRACE - not found using PkgConfig."
"\n Perhaps you should add the directory containing eztrace.pc to" "\n Perhaps you should add the directory containing eztrace.pc to"
"\n the PKG_CONFIG_PATH environment variable.${ColourReset}") "\n the PKG_CONFIG_PATH environment variable.${ColourReset}")
endif() endif()
endif() endif()
...@@ -180,15 +180,15 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT EZTRACE_FOUND) ...@@ -180,15 +180,15 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT EZTRACE_FOUND)
if(EZTRACE_DIR) if(EZTRACE_DIR)
set(EZTRACE_eztrace.h_DIRS "EZTRACE_eztrace.h_DIRS-NOTFOUND") set(EZTRACE_eztrace.h_DIRS "EZTRACE_eztrace.h_DIRS-NOTFOUND")
find_path(EZTRACE_eztrace.h_DIRS find_path(EZTRACE_eztrace.h_DIRS
NAMES eztrace.h NAMES eztrace.h
HINTS ${EZTRACE_DIR} HINTS ${EZTRACE_DIR}
PATH_SUFFIXES "include" "include/eztrace") PATH_SUFFIXES "include" "include/eztrace")
else() else()
set(EZTRACE_eztrace.h_DIRS "EZTRACE_eztrace.h_DIRS-NOTFOUND") set(EZTRACE_eztrace.h_DIRS "EZTRACE_eztrace.h_DIRS-NOTFOUND")
find_path(EZTRACE_eztrace.h_DIRS find_path(EZTRACE_eztrace.h_DIRS
NAMES eztrace.h NAMES eztrace.h
HINTS ${PATH_TO_LOOK_FOR} HINTS ${PATH_TO_LOOK_FOR}
PATH_SUFFIXES "eztrace") PATH_SUFFIXES "eztrace")
endif() endif()
endif() endif()
mark_as_advanced(EZTRACE_eztrace.h_DIRS) mark_as_advanced(EZTRACE_eztrace.h_DIRS)
...@@ -225,9 +225,9 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT EZTRACE_FOUND) ...@@ -225,9 +225,9 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT EZTRACE_FOUND)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}") string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
else() else()
if(APPLE) if(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}") string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else() else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}") string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif() endif()
list(APPEND _lib_env "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}") list(APPEND _lib_env "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
...@@ -251,14 +251,14 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT EZTRACE_FOUND) ...@@ -251,14 +251,14 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT EZTRACE_FOUND)
if(EZTRACE_DIR) if(EZTRACE_DIR)
set(EZTRACE_eztrace_LIBRARY "EZTRACE_eztrace_LIBRARY-NOTFOUND") set(EZTRACE_eztrace_LIBRARY "EZTRACE_eztrace_LIBRARY-NOTFOUND")
find_library(EZTRACE_eztrace_LIBRARY find_library(EZTRACE_eztrace_LIBRARY
NAMES eztrace NAMES eztrace
HINTS ${EZTRACE_DIR} HINTS ${EZTRACE_DIR}
PATH_SUFFIXES lib lib32 lib64) PATH_SUFFIXES lib lib32 lib64)
else() else()
set(EZTRACE_eztrace_LIBRARY "EZTRACE_eztrace_LIBRARY-NOTFOUND") set(EZTRACE_eztrace_LIBRARY "EZTRACE_eztrace_LIBRARY-NOTFOUND")
find_library(EZTRACE_eztrace_LIBRARY find_library(EZTRACE_eztrace_LIBRARY
NAMES eztrace NAMES eztrace
HINTS ${PATH_TO_LOOK_FOR}) HINTS ${PATH_TO_LOOK_FOR})
endif() endif()
endif() endif()
mark_as_advanced(EZTRACE_eztrace_LIBRARY) mark_as_advanced(EZTRACE_eztrace_LIBRARY)
...@@ -315,10 +315,10 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT EZTRACE_FOUND) ...@@ -315,10 +315,10 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT EZTRACE_FOUND)
if(NOT EZTRACE_WORKS) if(NOT EZTRACE_WORKS)
if(NOT EZTRACE_FIND_QUIETLY) if(NOT EZTRACE_FIND_QUIETLY)
message(STATUS "Looking for eztrace : test of eztrace_topology_init with eztrace library fails") message(STATUS "Looking for eztrace : test of eztrace_topology_init with eztrace library fails")
message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}") message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}")
message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}") message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}")
message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails") message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails")
endif() endif()
endif() endif()
set(CMAKE_REQUIRED_INCLUDES) set(CMAKE_REQUIRED_INCLUDES)
...@@ -334,6 +334,7 @@ if (EZTRACE_LIBRARIES) ...@@ -334,6 +334,7 @@ if (EZTRACE_LIBRARIES)
else() else()
list(GET EZTRACE_LIBRARIES 0 first_lib) list(GET EZTRACE_LIBRARIES 0 first_lib)
get_filename_component(first_lib_path "${first_lib}" PATH) get_filename_component(first_lib_path "${first_lib}" PATH)
set(EZTRACE_LIBRARY_DIRS "${first_lib_path}")
endif() endif()
if (${first_lib_path} MATCHES "/lib(32|64)?$") if (${first_lib_path} MATCHES "/lib(32|64)?$")
string(REGEX REPLACE "/lib(32|64)?$" "" not_cached_dir "${first_lib_path}") string(REGEX REPLACE "/lib(32|64)?$" "" not_cached_dir "${first_lib_path}")
......
...@@ -7,9 +7,10 @@ ...@@ -7,9 +7,10 @@
# Once done this will define # Once done this will define
# FABULOUS_FOUND - System has fabulous # FABULOUS_FOUND - System has fabulous
# FABULOUS_INCLUDE_DIRS - The fabulous include directories # FABULOUS_INCLUDE_DIRS - The fabulous include directories
# FABULOUS_MODULE_DIRS - The fabulous module directories for Fortran API
# FABULOUS_LIBRARIES - The libraries needed to use fabulous # FABULOUS_LIBRARIES - The libraries needed to use fabulous
# FABULOUS_DEFINITIONS - Compiler switches required for using fabulous # FABULOUS_DEFINITIONS - Compiler switches required for using fabulous
#
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
macro(FABULOUS_FIND_LIBRARIES_FROM_PKGCONFIG_RESULTS _prefix _pc_xprefix) macro(FABULOUS_FIND_LIBRARIES_FROM_PKGCONFIG_RESULTS _prefix _pc_xprefix)
...@@ -115,6 +116,8 @@ if ((NOT FABULOUS_FOUND) AND (FABULOUS_GIVEN_BY_USER OR (NOT PKG_CONFIG_FOUND))) ...@@ -115,6 +116,8 @@ if ((NOT FABULOUS_FOUND) AND (FABULOUS_GIVEN_BY_USER OR (NOT PKG_CONFIG_FOUND)))
endif() endif()
find_path(FABULOUS_INCLUDE_DIRS NAMES fabulous.h HINTS ${FABULOUS_INCDIR}) find_path(FABULOUS_INCLUDE_DIRS NAMES fabulous.h HINTS ${FABULOUS_INCDIR})
find_path(FABULOUS_MODULE_DIRS NAMES fabulous_mod.mod HINTS ${FABULOUS_INCDIR}
PATH_SUFFIXES fabulous)
find_library(FABULOUS_STATIC_LIBRARY NAMES libfabulous.a HINTS ${FABULOUS_LIBDIR}) find_library(FABULOUS_STATIC_LIBRARY NAMES libfabulous.a HINTS ${FABULOUS_LIBDIR})
find_library(FABULOUS_SHARED_LIBRARY NAMES libfabulous.so HINTS ${FABULOUS_LIBDIR}) find_library(FABULOUS_SHARED_LIBRARY NAMES libfabulous.so HINTS ${FABULOUS_LIBDIR})
else() else()
...@@ -127,6 +130,9 @@ if ((NOT FABULOUS_FOUND) AND (FABULOUS_GIVEN_BY_USER OR (NOT PKG_CONFIG_FOUND))) ...@@ -127,6 +130,9 @@ if ((NOT FABULOUS_FOUND) AND (FABULOUS_GIVEN_BY_USER OR (NOT PKG_CONFIG_FOUND)))
find_path(FABULOUS_INCLUDE_DIRS NAMES fabulous.h find_path(FABULOUS_INCLUDE_DIRS NAMES fabulous.h
HINTS ${FABULOUS_DIR} HINTS ${FABULOUS_DIR}
PATH_SUFFIXES include include/fabulous) PATH_SUFFIXES include include/fabulous)
find_path(FABULOUS_MODULE_DIRS NAMES fabulous_mod.mod
HINTS ${FABULOUS_DIR}
PATH_SUFFIXES include include/fabulous)
find_library(FABULOUS_STATIC_LIBRARY NAMES libfabulous.a find_library(FABULOUS_STATIC_LIBRARY NAMES libfabulous.a
HINTS ${FABULOUS_DIR} HINTS ${FABULOUS_DIR}
PATH_SUFFIXES lib lib32 lib64 lib/fabulous lib32/fabulous lib64/fabulous) PATH_SUFFIXES lib lib32 lib64 lib/fabulous lib32/fabulous lib64/fabulous)
...@@ -139,17 +145,18 @@ if ((NOT FABULOUS_FOUND) AND (FABULOUS_GIVEN_BY_USER OR (NOT PKG_CONFIG_FOUND))) ...@@ -139,17 +145,18 @@ if ((NOT FABULOUS_FOUND) AND (FABULOUS_GIVEN_BY_USER OR (NOT PKG_CONFIG_FOUND)))
find_package_handle_standard_args(FABULOUS_SHARED DEFAULT_MSG FABULOUS_SHARED_LIBRARY) find_package_handle_standard_args(FABULOUS_SHARED DEFAULT_MSG FABULOUS_SHARED_LIBRARY)
mark_as_advanced(FABULOUS_STATIC_LIBRARY FABULOUS_SHARED_LIBRARY) mark_as_advanced(FABULOUS_STATIC_LIBRARY FABULOUS_SHARED_LIBRARY)
if (FABULOUS_FIND_REQUIRED)
find_package(CBLAS REQUIRED)
find_package(LAPACKE REQUIRED)
else()
find_package(CBLAS)
find_package(LAPACKE)
endif()
if (FABULOUS_STATIC_FOUND AND NOT FABULOUS_SHARED_FOUND) if (FABULOUS_STATIC_FOUND AND NOT FABULOUS_SHARED_FOUND)
if (FABULOUS_FIND_REQUIRED) set(FABULOUS_LIBRARIES ${FABULOUS_STATIC_LIBRARY} ${CBLAS_LIBRARIES} ${LAPACKE_LIBRARIES} "-lstdc++" "-lm")
find_package(CBLAS REQUIRED)
find_package(LAPACKE REQUIRED)
else()
find_package(CBLAS)
find_package(LAPACKE)
endif()
set(FABULOUS_LIBRARIES ${FABULOUS_STATIC_LIBRARY} ${CBLAS_LIBRARIES} ${LAPACKE_LIBRARIES})
elseif(FABULOUS_SHARED_FOUND) elseif(FABULOUS_SHARED_FOUND)
set(FABULOUS_LIBRARIES ${FABULOUS_SHARED_LIBRARY}) set(FABULOUS_LIBRARIES ${FABULOUS_SHARED_LIBRARY} ${CBLAS_LIBRARIES} ${LAPACKE_LIBRARIES})
endif() endif()
fabulous_check_function_exists(FABULOUS fabulous_create) fabulous_check_function_exists(FABULOUS fabulous_create)
find_package_handle_standard_args( find_package_handle_standard_args(
......
This diff is collapsed.
...@@ -78,8 +78,8 @@ if(PKG_CONFIG_EXECUTABLE AND NOT FXT_GIVEN_BY_USER) ...@@ -78,8 +78,8 @@ if(PKG_CONFIG_EXECUTABLE AND NOT FXT_GIVEN_BY_USER)
#endif() #endif()
else() else()
message(STATUS "${Magenta}Looking for FXT - not found using PkgConfig." message(STATUS "${Magenta}Looking for FXT - not found using PkgConfig."
"\n Perhaps you should add the directory containing fxt.pc to the" "\n Perhaps you should add the directory containing fxt.pc to the"
"\n PKG_CONFIG_PATH environment variable.${ColourReset}") "\n PKG_CONFIG_PATH environment variable.${ColourReset}")
endif() endif()
endif() endif()
...@@ -137,15 +137,15 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT FXT_FOUND) OR ...@@ -137,15 +137,15 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT FXT_FOUND) OR
if(FXT_DIR) if(FXT_DIR)
set(FXT_fxt.h_DIRS "FXT_fxt.h_DIRS-NOTFOUND") set(FXT_fxt.h_DIRS "FXT_fxt.h_DIRS-NOTFOUND")
find_path(FXT_fxt.h_DIRS find_path(FXT_fxt.h_DIRS
NAMES fxt.h NAMES fxt.h
HINTS ${FXT_DIR} HINTS ${FXT_DIR}
PATH_SUFFIXES "include" "include/fxt") PATH_SUFFIXES "include" "include/fxt")
else() else()
set(FXT_fxt.h_DIRS "FXT_fxt.h_DIRS-NOTFOUND") set(FXT_fxt.h_DIRS "FXT_fxt.h_DIRS-NOTFOUND")
find_path(FXT_fxt.h_DIRS find_path(FXT_fxt.h_DIRS
NAMES fxt.h NAMES fxt.h
HINTS ${_inc_env} HINTS ${_inc_env}
PATH_SUFFIXES "fxt") PATH_SUFFIXES "fxt")
endif() endif()
endif() endif()
mark_as_advanced(FXT_fxt.h_DIRS) mark_as_advanced(FXT_fxt.h_DIRS)
...@@ -183,9 +183,9 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT FXT_FOUND) OR ...@@ -183,9 +183,9 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT FXT_FOUND) OR
string(REPLACE ":" ";" _lib_env "$ENV{LIB}") string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
else() else()
if(APPLE) if(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}") string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else() else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}") string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif() endif()
list(APPEND _lib_env "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}") list(APPEND _lib_env "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
...@@ -206,14 +206,14 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT FXT_FOUND) OR ...@@ -206,14 +206,14 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT FXT_FOUND) OR
if(FXT_DIR) if(FXT_DIR)
set(FXT_fxt_LIBRARY "FXT_fxt_LIBRARY-NOTFOUND") set(FXT_fxt_LIBRARY "FXT_fxt_LIBRARY-NOTFOUND")
find_library(FXT_fxt_LIBRARY find_library(FXT_fxt_LIBRARY
NAMES fxt NAMES fxt
HINTS ${FXT_DIR} HINTS ${FXT_DIR}
PATH_SUFFIXES lib lib32 lib64) PATH_SUFFIXES lib lib32 lib64)
else() else()
set(FXT_fxt_LIBRARY "FXT_fxt_LIBRARY-NOTFOUND") set(FXT_fxt_LIBRARY "FXT_fxt_LIBRARY-NOTFOUND")
find_library(FXT_fxt_LIBRARY find_library(FXT_fxt_LIBRARY
NAMES fxt NAMES fxt
HINTS ${_lib_env}) HINTS ${_lib_env})
endif() endif()
endif() endif()
mark_as_advanced(FXT_fxt_LIBRARY) mark_as_advanced(FXT_fxt_LIBRARY)
...@@ -270,10 +270,10 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT FXT_FOUND) OR ...@@ -270,10 +270,10 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT FXT_FOUND) OR
if(NOT FXT_WORKS) if(NOT FXT_WORKS)
if(NOT FXT_FIND_QUIETLY) if(NOT FXT_FIND_QUIETLY)
message(STATUS "Looking for fxt : test of fut_keychange with fxt library fails") message(STATUS "Looking for fxt : test of fut_keychange with fxt library fails")
message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}") message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}")
message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}") message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}")
message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails") message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails")
endif() endif()
endif() endif()
set(CMAKE_REQUIRED_INCLUDES) set(CMAKE_REQUIRED_INCLUDES)
...@@ -289,6 +289,7 @@ if (FXT_LIBRARIES) ...@@ -289,6 +289,7 @@ if (FXT_LIBRARIES)
else() else()
list(GET FXT_LIBRARIES 0 first_lib) list(GET FXT_LIBRARIES 0 first_lib)
get_filename_component(first_lib_path "${first_lib}" PATH) get_filename_component(first_lib_path "${first_lib}" PATH)
set(FXT_LIBRARY_DIRS "${first_lib_path}")
endif() endif()
if (${first_lib_path} MATCHES "/lib(32|64)?$") if (${first_lib_path} MATCHES "/lib(32|64)?$")
string(REGEX REPLACE "/lib(32|64)?$" "" not_cached_dir "${first_lib_path}") string(REGEX REPLACE "/lib(32|64)?$" "" not_cached_dir "${first_lib_path}")
......
...@@ -78,8 +78,8 @@ if(PKG_CONFIG_EXECUTABLE AND NOT GTG_GIVEN_BY_USER) ...@@ -78,8 +78,8 @@ if(PKG_CONFIG_EXECUTABLE AND NOT GTG_GIVEN_BY_USER)
#endif() #endif()
else() else()
message(STATUS "${Magenta}Looking for GTG - not found using PkgConfig." message(STATUS "${Magenta}Looking for GTG - not found using PkgConfig."
"\n Perhaps you should add the directory containing gtg.pc to the" "\n Perhaps you should add the directory containing gtg.pc to the"
"\n PKG_CONFIG_PATH environment variable.${ColourReset}") "\n PKG_CONFIG_PATH environment variable.${ColourReset}")
endif() endif()
endif() endif()
...@@ -137,15 +137,15 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT GTG_FOUND) OR ...@@ -137,15 +137,15 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT GTG_FOUND) OR
if(GTG_DIR) if(GTG_DIR)
set(GTG_GTG.h_DIRS "GTG_GTG.h_DIRS-NOTFOUND") set(GTG_GTG.h_DIRS "GTG_GTG.h_DIRS-NOTFOUND")
find_path(GTG_GTG.h_DIRS find_path(GTG_GTG.h_DIRS
NAMES GTG.h NAMES GTG.h
HINTS ${GTG_DIR} HINTS ${GTG_DIR}
PATH_SUFFIXES "include" "include/gtg") PATH_SUFFIXES "include" "include/gtg")
else() else()
set(GTG_GTG.h_DIRS "GTG_GTG.h_DIRS-NOTFOUND") set(GTG_GTG.h_DIRS "GTG_GTG.h_DIRS-NOTFOUND")
find_path(GTG_GTG.h_DIRS find_path(GTG_GTG.h_DIRS
NAMES GTG.h NAMES GTG.h
HINTS ${_inc_env} HINTS ${_inc_env}
PATH_SUFFIXES "gtg") PATH_SUFFIXES "gtg")
endif() endif()
endif() endif()
mark_as_advanced(GTG_GTG.h_DIRS) mark_as_advanced(GTG_GTG.h_DIRS)
...@@ -183,9 +183,9 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT GTG_FOUND) OR ...@@ -183,9 +183,9 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT GTG_FOUND) OR
string(REPLACE ":" ";" _lib_env "$ENV{LIB}") string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
else() else()
if(APPLE) if(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}") string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else() else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}") string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif() endif()
list(APPEND _lib_env "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}") list(APPEND _lib_env "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}")
list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
...@@ -206,14 +206,14 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT GTG_FOUND) OR ...@@ -206,14 +206,14 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT GTG_FOUND) OR
if(GTG_DIR) if(GTG_DIR)
set(GTG_gtg_LIBRARY "GTG_gtg_LIBRARY-NOTFOUND") set(GTG_gtg_LIBRARY "GTG_gtg_LIBRARY-NOTFOUND")
find_library(GTG_gtg_LIBRARY find_library(GTG_gtg_LIBRARY
NAMES gtg NAMES gtg
HINTS ${GTG_DIR} HINTS ${GTG_DIR}
PATH_SUFFIXES lib lib32 lib64) PATH_SUFFIXES lib lib32 lib64)
else() else()
set(GTG_gtg_LIBRARY "GTG_gtg_LIBRARY-NOTFOUND") set(GTG_gtg_LIBRARY "GTG_gtg_LIBRARY-NOTFOUND")
find_library(GTG_gtg_LIBRARY find_library(GTG_gtg_LIBRARY
NAMES gtg NAMES gtg
HINTS ${_lib_env}) HINTS ${_lib_env})
endif() endif()
endif() endif()
mark_as_advanced(GTG_gtg_LIBRARY) mark_as_advanced(GTG_gtg_LIBRARY)
...@@ -270,10 +270,10 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT GTG_FOUND) OR ...@@ -270,10 +270,10 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT GTG_FOUND) OR
if(NOT GTG_WORKS) if(NOT GTG_WORKS)
if(NOT GTG_FIND_QUIETLY) if(NOT GTG_FIND_QUIETLY)
message(STATUS "Looking for gtg : test of GTG_start with gtg library fails") message(STATUS "Looking for gtg : test of GTG_start with gtg library fails")
message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}") message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}")
message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}") message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}")
message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails") message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails")
endif() endif()
endif() endif()
set(CMAKE_REQUIRED_INCLUDES) set(CMAKE_REQUIRED_INCLUDES)
...@@ -289,6 +289,7 @@ if (GTG_LIBRARIES) ...@@ -289,6 +289,7 @@ if (GTG_LIBRARIES)
else() else()
list(GET GTG_LIBRARIES 0 first_lib) list(GET GTG_LIBRARIES 0 first_lib)
get_filename_component(first_lib_path "${first_lib}" PATH) get_filename_component(first_lib_path "${first_lib}" PATH)
set(GTG_LIBRARY_DIRS "${first_lib_path}")
endif() endif()
if (${first_lib_path} MATCHES "/lib(32|64)?$") if (${first_lib_path} MATCHES "/lib(32|64)?$")
string(REGEX REPLACE "/lib(32|64)?$" "" not_cached_dir "${first_lib_path}") string(REGEX REPLACE "/lib(32|64)?$" "" not_cached_dir "${first_lib_path}")
......
...@@ -77,8 +77,8 @@ if(PKG_CONFIG_EXECUTABLE AND NOT HQR_GIVEN_BY_USER) ...@@ -77,8 +77,8 @@ if(PKG_CONFIG_EXECUTABLE AND NOT HQR_GIVEN_BY_USER)
#endif() #endif()
else() else()
message(STATUS "${Magenta}Looking for HQR - not found using PkgConfig." message(STATUS "${Magenta}Looking for HQR - not found using PkgConfig."
"\n Perhaps you should add the directory containing hqr.pc to the" "\n Perhaps you should add the directory containing hqr.pc to the"
"\n PKG_CONFIG_PATH environment variable.${ColourReset}") "\n PKG_CONFIG_PATH environment variable.${ColourReset}")
endif() endif()
endif() endif()
...@@ -133,14 +133,14 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT HQR_FOUND) OR ...@@ -133,14 +133,14 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT HQR_FOUND) OR
if(HQR_DIR) if(HQR_DIR)
set(HQR_libhqr.h_DIRS "HQR_libhqr.h_DIRS-NOTFOUND") set(HQR_libhqr.h_DIRS "HQR_libhqr.h_DIRS-NOTFOUND")
find_path(HQR_libhqr.h_DIRS find_path(HQR_libhqr.h_DIRS
NAMES libhqr.h NAMES libhqr.h
HINTS ${HQR_DIR} HINTS ${HQR_DIR})
else() else()
set(HQR_libhqr.h_DIRS "HQR_libhqr.h_DIRS-NOTFOUND"