From accb9f2fe8fd8f6a1e114adac5b15304b0e0012d Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 20 Jul 2011 19:04:32 -0700 Subject: gr: squashed cmakelists.txt into one commit --- cmake/Modules/FindFFTW3f.cmake | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 cmake/Modules/FindFFTW3f.cmake (limited to 'cmake/Modules/FindFFTW3f.cmake') diff --git a/cmake/Modules/FindFFTW3f.cmake b/cmake/Modules/FindFFTW3f.cmake new file mode 100644 index 000000000..d84bb37a8 --- /dev/null +++ b/cmake/Modules/FindFFTW3f.cmake @@ -0,0 +1,32 @@ +# http://tim.klingt.org/code/projects/supernova/repository/revisions/d336dd6f400e381bcfd720e96139656de0c53b6a/entry/cmake_modules/FindFFTW3f.cmake +# Find single-precision (float) version of FFTW3 + +INCLUDE(FindPkgConfig) +PKG_CHECK_MODULES(FFTW3F "fftw3f >= 3.0") +IF(NOT FFTW3F_FOUND) + +FIND_PATH( + FFTW3F_INCLUDE_DIRS + NAMES fftw3.h + HINTS $ENV{FFTW3_DIR}/include + PATHS /usr/local/include + /usr/include +) + +FIND_LIBRARY( + FFTW3F_LIBRARIES + NAMES fftw3f libfftw3f + HINTS $ENV{FFTW3_DIR}/lib + PATHS /usr/local/lib + /usr/lib +) + +SET(FFTW3F_FOUND "NO") + +IF( FFTW3F_INCLUDE_DIRS AND FFTW3F_LIBRARIES ) + SET(FFTW3F_FOUND "YES") +ENDIF() + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(FFTW3F DEFAULT_MSG FFTW3F_LIBRARIES FFTW3F_INCLUDE_DIRS) +ENDIF(NOT FFTW3F_FOUND) -- cgit From 8524736fe3c5812b5e8e0a85af45c4775a2d4ca2 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sat, 17 Sep 2011 09:26:19 -0400 Subject: cmake: modified find files to better follow coding guide http://www.cmake.org/cgi-bin/viewcvs.cgi/Modules/readme.txt?root=CMake&view=markup --- cmake/Modules/FindFFTW3f.cmake | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'cmake/Modules/FindFFTW3f.cmake') diff --git a/cmake/Modules/FindFFTW3f.cmake b/cmake/Modules/FindFFTW3f.cmake index d84bb37a8..e8b581aed 100644 --- a/cmake/Modules/FindFFTW3f.cmake +++ b/cmake/Modules/FindFFTW3f.cmake @@ -1,14 +1,16 @@ # http://tim.klingt.org/code/projects/supernova/repository/revisions/d336dd6f400e381bcfd720e96139656de0c53b6a/entry/cmake_modules/FindFFTW3f.cmake +# Modified to use pkg config and use standard var names + # Find single-precision (float) version of FFTW3 INCLUDE(FindPkgConfig) -PKG_CHECK_MODULES(FFTW3F "fftw3f >= 3.0") -IF(NOT FFTW3F_FOUND) +PKG_CHECK_MODULES(PC_FFTW3F "fftw3f >= 3.0" QUIET) FIND_PATH( FFTW3F_INCLUDE_DIRS NAMES fftw3.h HINTS $ENV{FFTW3_DIR}/include + ${PC_FFTW3F_INCLUDE_DIRS} PATHS /usr/local/include /usr/include ) @@ -17,16 +19,11 @@ FIND_LIBRARY( FFTW3F_LIBRARIES NAMES fftw3f libfftw3f HINTS $ENV{FFTW3_DIR}/lib + ${PC_FFTW3F_LIBRARIES} PATHS /usr/local/lib /usr/lib ) -SET(FFTW3F_FOUND "NO") - -IF( FFTW3F_INCLUDE_DIRS AND FFTW3F_LIBRARIES ) - SET(FFTW3F_FOUND "YES") -ENDIF() - INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(FFTW3F DEFAULT_MSG FFTW3F_LIBRARIES FFTW3F_INCLUDE_DIRS) -ENDIF(NOT FFTW3F_FOUND) +MARK_AS_ADVANCED(FFTW3F_LIBRARIES FFTW3F_INCLUDE_DIRS) -- cgit From fde3f39419a301d87bb460f9b857e3454d019aa9 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 25 Oct 2011 16:19:53 -0700 Subject: cmake: fix for find* scripts Yes there was a misunderstanding and I read the docs wrong. This change uses the correct lib and inc dirs set by the pkg config macro. http://techbase.kde.org/Policies/CMake_Coding_Style#Writing_CMake_Find-modules --- cmake/Modules/FindFFTW3f.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmake/Modules/FindFFTW3f.cmake') diff --git a/cmake/Modules/FindFFTW3f.cmake b/cmake/Modules/FindFFTW3f.cmake index e8b581aed..252af2522 100644 --- a/cmake/Modules/FindFFTW3f.cmake +++ b/cmake/Modules/FindFFTW3f.cmake @@ -10,7 +10,7 @@ FIND_PATH( FFTW3F_INCLUDE_DIRS NAMES fftw3.h HINTS $ENV{FFTW3_DIR}/include - ${PC_FFTW3F_INCLUDE_DIRS} + ${PC_FFTW3F_INCLUDE_DIR} PATHS /usr/local/include /usr/include ) @@ -19,7 +19,7 @@ FIND_LIBRARY( FFTW3F_LIBRARIES NAMES fftw3f libfftw3f HINTS $ENV{FFTW3_DIR}/lib - ${PC_FFTW3F_LIBRARIES} + ${PC_FFTW3F_LIBDIR} PATHS /usr/local/lib /usr/lib ) -- cgit From 0ee2298b82a20ab13da022e1991be13f5272d581 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 12 Dec 2011 14:08:55 -0800 Subject: cmake: fix QUIET arg usage on PKG_CHECK_MODULES --- cmake/Modules/FindFFTW3f.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmake/Modules/FindFFTW3f.cmake') diff --git a/cmake/Modules/FindFFTW3f.cmake b/cmake/Modules/FindFFTW3f.cmake index 252af2522..beb5c189e 100644 --- a/cmake/Modules/FindFFTW3f.cmake +++ b/cmake/Modules/FindFFTW3f.cmake @@ -4,7 +4,7 @@ # Find single-precision (float) version of FFTW3 INCLUDE(FindPkgConfig) -PKG_CHECK_MODULES(PC_FFTW3F "fftw3f >= 3.0" QUIET) +PKG_CHECK_MODULES(PC_FFTW3F QUIET "fftw3f >= 3.0") FIND_PATH( FFTW3F_INCLUDE_DIRS -- cgit From e6805a25568a5ce24937039f57a6eb1df1f82aa9 Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Sun, 5 Feb 2012 10:37:02 -0800 Subject: cmake: remove QUIET option from some listfiles * PKG_CHECK_MODULES only supports QUIET >=2.8.2, Ubuntu LTS has 2.8.0 --- cmake/Modules/FindFFTW3f.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmake/Modules/FindFFTW3f.cmake') diff --git a/cmake/Modules/FindFFTW3f.cmake b/cmake/Modules/FindFFTW3f.cmake index beb5c189e..078108958 100644 --- a/cmake/Modules/FindFFTW3f.cmake +++ b/cmake/Modules/FindFFTW3f.cmake @@ -4,7 +4,7 @@ # Find single-precision (float) version of FFTW3 INCLUDE(FindPkgConfig) -PKG_CHECK_MODULES(PC_FFTW3F QUIET "fftw3f >= 3.0") +PKG_CHECK_MODULES(PC_FFTW3F "fftw3f >= 3.0") FIND_PATH( FFTW3F_INCLUDE_DIRS -- cgit From 4defc0e618b04ceb71091ab3e3df62ca3e4858d8 Mon Sep 17 00:00:00 2001 From: Marcus Leech Date: Mon, 6 Feb 2012 11:11:06 -0500 Subject: core: enable use of fftw's threading capabilities. Can set nthreads when creating an fftw class; defaults to 1, so there's no change in default behavior. --- cmake/Modules/FindFFTW3f.cmake | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'cmake/Modules/FindFFTW3f.cmake') diff --git a/cmake/Modules/FindFFTW3f.cmake b/cmake/Modules/FindFFTW3f.cmake index 078108958..ec6629f3a 100644 --- a/cmake/Modules/FindFFTW3f.cmake +++ b/cmake/Modules/FindFFTW3f.cmake @@ -22,8 +22,20 @@ FIND_LIBRARY( ${PC_FFTW3F_LIBDIR} PATHS /usr/local/lib /usr/lib + /usr/lib64 ) +FIND_LIBRARY( + FFTW3F_THREADS_LIBRARIES + NAMES fftw3f_threads libfftw3f_threads + HINTS $ENV{FFTW3_DIR}/lib + ${PC_FFTW3F_LIBDIR} + PATHS /usr/local/lib + /usr/lib + /usr/lib64 +) + + INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(FFTW3F DEFAULT_MSG FFTW3F_LIBRARIES FFTW3F_INCLUDE_DIRS) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(FFTW3F DEFAULT_MSG FFTW3F_LIBRARIES FFTW3F_INCLUDE_DIRS FFTW3F_THREADS_LIBRARIES) MARK_AS_ADVANCED(FFTW3F_LIBRARIES FFTW3F_INCLUDE_DIRS) -- cgit From c2c8a53bee19e820859d01d8657821127c75b762 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Wed, 8 Feb 2012 19:48:02 -0500 Subject: cmake: fix for handling fftw_threads as an optional library only. --- cmake/Modules/FindFFTW3f.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmake/Modules/FindFFTW3f.cmake') diff --git a/cmake/Modules/FindFFTW3f.cmake b/cmake/Modules/FindFFTW3f.cmake index ec6629f3a..0ee7e46fe 100644 --- a/cmake/Modules/FindFFTW3f.cmake +++ b/cmake/Modules/FindFFTW3f.cmake @@ -37,5 +37,5 @@ FIND_LIBRARY( INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(FFTW3F DEFAULT_MSG FFTW3F_LIBRARIES FFTW3F_INCLUDE_DIRS FFTW3F_THREADS_LIBRARIES) -MARK_AS_ADVANCED(FFTW3F_LIBRARIES FFTW3F_INCLUDE_DIRS) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(FFTW3F DEFAULT_MSG FFTW3F_LIBRARIES FFTW3F_INCLUDE_DIRS) +MARK_AS_ADVANCED(FFTW3F_LIBRARIES FFTW3F_INCLUDE_DIRS FFTW3F_THREADS_LIBRARIES) \ No newline at end of file -- cgit