Renewing cmake config

parent 96b28e10
......@@ -11,25 +11,21 @@ vista_use_package( fftw )
vista_use_package( MKL )
#vista_find_package( FFTS )
if( NOT DEFINED ITA_CORE_LIBS_BUILD_STATIC )
set( ITA_CORE_LIBS_BUILD_STATIC OFF CACHE BOOL "Build all ITA core libs in static mode" )
endif( NOT DEFINED ITA_CORE_LIBS_BUILD_STATIC )
if( NOT DEFINED ITA_FFT_WITH_FFTW3 )
set( ITA_FFT_WITH_FFTW3 ON CACHE BOOL "Build with FFTW3 for fast fourier transforms" )
endif( NOT DEFINED ITA_FFT_WITH_FFTW3 )
endif()
if( NOT DEFINED ITA_FFT_WITH_INTEL_MKL10 )
set( ITA_FFT_WITH_INTEL_MKL10 OFF CACHE BOOL "Build with Intel MKL for fast fourier transforms" )
endif( NOT DEFINED ITA_FFT_WITH_INTEL_MKL10 )
endif()
if( NOT DEFINED ITA_FFT_WITH_INTEL_TBB )
set( ITA_FFT_WITH_INTEL_TBB OFF CACHE BOOL "Build with Intel TBB for fast fourier transforms" )
endif( NOT DEFINED ITA_FFT_WITH_INTEL_TBB )
endif()
if( NOT DEFINED ITA_FFT_WITH_FFTS )
set( ITA_FFT_WITH_FFTS OFF CACHE BOOL "Build with FFTS for fast fourier transforms" )
endif( NOT DEFINED ITA_FFT_WITH_FFTS )
endif()
# includes
......@@ -53,33 +49,26 @@ set( ITAFFTSources
if( ITA_FFT_WITH_FFTW3 )
set( ITAFFTSources "${ITAFFTSources}" src/FFTW3Backend.h src/FFTW3Backend.cpp )
add_definitions( -DITAFFT_WITH_FFTW3 )
endif( ITA_FFT_WITH_FFTW3 )
endif()
if( ITA_FFT_WITH_INTEL_MKL10 )
set( ITAFFTSources "${ITAFFTSources}" src/MKL10Backend.h src/MKL10Backend.cpp )
add_definitions( -DITAFFT_WITH_MKL10 )
endif( ITA_FFT_WITH_INTEL_MKL10 )
endif()
# compiler settings
if( NOT ITA_CORE_LIBS_BUILD_STATIC )
add_definitions( -DITA_FFT_EXPORT )
else( NOT ITA_CORE_LIBS_BUILD_STATIC )
add_definitions( -DITA_FFT_STATIC -DITA_BASE_STATIC )
set( BUILD_SHARED_LIBS_TEMP ${BUILD_SHARED_LIBS} )
if( BUILD_SHARED_LIBS )
set( BUILD_SHARED_LIBS OFF )
message( "Ignoring activated BUILD_SHARED_LIBS temporary because static ITA core libs requested" )
endif( BUILD_SHARED_LIBS )
endif( NOT ITA_CORE_LIBS_BUILD_STATIC )
else()
add_definitions( -DITA_FFT_STATIC )
endif()
# linker
add_library( ITAFFT ${ITAFFTHeader} ${ITAFFTSources} )
target_link_libraries( ITAFFT ${VISTA_USE_PACKAGE_LIBRARIES} )
set( BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_TEMP} )
# config
vista_configure_lib( ITAFFT )
......@@ -90,7 +79,9 @@ vista_create_default_info_file( ITAFFT )
set_property( TARGET ITAFFT PROPERTY FOLDER "ITACoreLibs" )
# tests
set( ITAFFT_COMMON_BUILD TRUE )
add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/tests" )
if( ITA_CORE_LIBS_WITH_TESTS )
set( ITAFFT_COMMON_BUILD TRUE )
add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/tests" )
endif()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment